Fixed replacement of placeholders during build process

This commit is contained in:
squidfunk 2019-11-27 22:05:58 +01:00
parent c409fe3953
commit 057225d323

View File

@ -184,9 +184,10 @@ material/%.yml: src/%.yml
NAME = $(shell jq -r '.name' package.json)
VERSION = $(shell jq -r '.version' package.json)
material: $$@/assets $$@/__init__.py $$@/mkdocs_theme.yml ${HTML}
@ sed -i"" "s/\$$md-name\$$/${NAME}/" $@/base.html
@ sed -i"" "s/\$$md-version\$$/${VERSION}/" $@/base.html
@ sed -i"" "s/\$$md-lunr-languages\$$/${LUNR_LANGUAGES}/" $@/base.html
@ sed -i.tmp 's/\$$md-name\$$/${NAME}/' $@/base.html
@ sed -i.tmp 's/\$$md-version\$$/${VERSION}/' $@/base.html
@ sed -i.tmp 's/\$$md-lunr-languages\$$/${LUNR_LANGUAGES}/' $@/base.html
@ rm -f $@/*.tmp
@ echo "\n ${NAME}-${VERSION}\n"
# -----------------------------------------------------------------------------