mirror of
https://github.com/LukeSmithxyz/based.cooking.git
synced 2024-11-27 16:05:44 +00:00
add list of tag links at the end of each recipe
This commit is contained in:
parent
0be88c1d12
commit
d42399ae92
9
Makefile
9
Makefile
@ -131,7 +131,7 @@ blog/@%.html: $(TAGFILES) $(addprefix templates/,$(addsuffix .html,header tag_in
|
||||
envsubst < templates/footer.html >> $@; \
|
||||
|
||||
|
||||
blog/%.html: $(BLOG_SRC)/%.md $(addprefix templates/,$(addsuffix .html,header article_header article_footer footer))
|
||||
blog/%.html: $(BLOG_SRC)/%.md $(addprefix templates/,$(addsuffix .html,header article_header tag_link_header tag_link tag_link_footer article_footer footer))
|
||||
mkdir -p blog
|
||||
TITLE="$(shell head -n1 $< | sed 's/^# \+//')"; \
|
||||
export TITLE; \
|
||||
@ -148,6 +148,13 @@ blog/%.html: $(BLOG_SRC)/%.md $(addprefix templates/,$(addsuffix .html,header ar
|
||||
envsubst < templates/header.html > $@; \
|
||||
envsubst < templates/article_header.html >> $@; \
|
||||
sed -e '/^;/d' < $< | markdown -f fencedcode >> $@; \
|
||||
envsubst < templates/tag_link_header.html >> $@; \
|
||||
for i in $${TAGS} ; do \
|
||||
TAG_NAME="$$i" \
|
||||
TAG_LINK="./@$$i.html" \
|
||||
envsubst < templates/tag_link.html >> $@; \
|
||||
done; \
|
||||
envsubst < templates/tag_link_footer.html >> $@; \
|
||||
envsubst < templates/article_footer.html >> $@; \
|
||||
envsubst < templates/footer.html >> $@; \
|
||||
|
||||
|
1
templates/tag_link.html
Normal file
1
templates/tag_link.html
Normal file
@ -0,0 +1 @@
|
||||
<a href="$TAG_LINK">$TAG_NAME</a>
|
1
templates/tag_link_footer.html
Normal file
1
templates/tag_link_footer.html
Normal file
@ -0,0 +1 @@
|
||||
</i></p>
|
1
templates/tag_link_header.html
Normal file
1
templates/tag_link_header.html
Normal file
@ -0,0 +1 @@
|
||||
<p><i> Recipe tags:
|
Loading…
Reference in New Issue
Block a user