Skip to content

Commit 64e3dd3

Browse files
authored
Avoid picking up shortcodes outside of theme site (#324)
We change into the theme layout directory to prevent picking up shortcodes from other checked-out repositories during the multi-site build.
1 parent 4cf5eca commit 64e3dd3

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ teams-clean:
2121
teams: | teams-clean $(patsubst %,$(TEAMS_DIR)/%.md,$(TEAMS))
2222

2323
doc/content/shortcodes.md: $(wildcard layouts/shortcodes/*.html)
24-
python tools/render_shortcode_docs.py > doc/content/shortcodes.md
24+
(cd layouts && python ../tools/render_shortcode_docs.py > ../doc/content/shortcodes.md)
2525

2626
# Serve for development purposes.
2727
doc-serve: doc/content/shortcodes.md

doc/netlify.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
publish = "public"
1919
command = """\
2020
export DART_SASS_TARBALL="dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" && \
21-
curl -LJO ${DART_SASS_URL}/${DART_SASS_VERSION}/${DART_SASS_TARBALL} && \
22-
tar -xf ${DART_SASS_TARBALL} && \
23-
rm ${DART_SASS_TARBALL} && \
24-
export PATH=/opt/build/repo/doc/dart-sass:$PATH && \
25-
(cd ../.. ; ln -s repo scientific-python-hugo-theme) && \
26-
(cd .. ; make ${BUILD_TARGET}) \
21+
(cd /tmp && \
22+
curl -LJO ${DART_SASS_URL}/${DART_SASS_VERSION}/${DART_SASS_TARBALL} && \
23+
tar -xf ${DART_SASS_TARBALL} && \
24+
rm ${DART_SASS_TARBALL}) && \
25+
export PATH=/tmp/dart-sass:$PATH && \
26+
(cd ../.. && ln -s repo scientific-python-hugo-theme) && \
27+
(cd .. && make ${BUILD_TARGET})
2728
"""
2829

2930
[[plugins]]

0 commit comments

Comments
 (0)