Skip to content

Commit 16bd7ff

Browse files
committed
Extend Makefile to handle static images
Signed-off-by: Andrea Frittoli <[email protected]>
1 parent a4b5e50 commit 16bd7ff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
.PHONY: serve
22
serve:
33
echo "Local development"
4+
cd themes/docsy && git submodule update -f --init
5+
cp content/en/docs/images/* static/images/
6+
sed -i -e 's/\(images\/[a-zA-Z\-]*\.svg\)/\/\1/g' content/en/docs/*.md
47
hugo server \
58
--baseURL $(URL) \
69
--buildDrafts \
@@ -12,9 +15,13 @@ serve:
1215
.PHONY: production-build
1316
production-build:
1417
cd themes/docsy && git submodule update -f --init
18+
cp content/en/docs/images/* static/images/
19+
sed -i -e 's/\(images\/[a-zA-Z\-]*\.svg\)/\/\1/g' content/en/docs/*.md
1520
hugo --baseURL $(URL)
1621

1722
.PHONY: preview-build
1823
preview-build:
1924
cd themes/docsy && git submodule update -f --init
25+
cp content/en/docs/images/* static/images/
26+
sed -i -e 's/\(images\/[a-zA-Z\-]*\.svg\)/\/\1/g' content/en/docs/*.md
2027
hugo --baseURL $(DEPLOY_PRIME_URL)

0 commit comments

Comments
 (0)