@@ -28,7 +28,9 @@ clean-all:
28
28
echo " Generating $$ (basename $@ )" ; \
29
29
include $*
30
30
31
- % .html : template.html % .yaml
31
+ SOURCES =$(shell find . -maxdepth 1 -name \* .yaml -printf '% P\n' | xargs -I{} basename {} .yaml)
32
+
33
+ $(addsuffix .html,$(SOURCES ) ) :% .html: Makefile template.html % .yaml
32
34
@\
33
35
TITLE=" $$ (yq eval '.metadata.title' $* .yaml)" ; \
34
36
SUBTITLE=" $$ (yq eval '.metadata.subtitle' $* .yaml)" ; \
@@ -46,11 +48,34 @@ clean-all:
46
48
| xmlstarlet ed -P -N x=" http://www.w3.org/1999/xhtml" -u " /x:html/x:body//x:section[@id='title']//x:a" -v " $$ {EVENT}" \
47
49
| xmlstarlet ed -P -N x=" http://www.w3.org/1999/xhtml" -u " /x:html/x:body//x:section[@id='title']//x:a/@href" -v " $$ {LINK}" \
48
50
| xmlstarlet ed -P -N x=" http://www.w3.org/1999/xhtml" -u " /x:html/x:body//x:section[@id='title']//x:img/@src" -v " $$ {LOGO}" \
49
- | xmlstarlet ed -P -N x=" http://www.w3.org/1999/xhtml" -a " /x:html/x:body//x:section[@id='title']" -t elem -n section \
50
- | xmlstarlet ed -P -N x=" http://www.w3.org/1999/xhtml" -a " /x:html/x:body//x:section[not(@id)]" -t attr -n id -v " FOO" \
51
- | xmlstarlet ed -P -N x=" http://www.w3.org/1999/xhtml" -a " /x:html/x:body//x:section[@id='FOO']" -t attr -n data-separator -v " ^---$$ " \
52
- | xmlstarlet ed -P -N x=" http://www.w3.org/1999/xhtml" -a " /x:html/x:body//x:section[@id='FOO']" -t attr -n data-separator-vertical -v " ^--$$ " \
53
- > $@
51
+ > $@ ; \
52
+ yq eval ' .slides[]' $* .yaml \
53
+ | while read -r FILE; do \
54
+ xmlstarlet ed --inplace -P -N x=" http://www.w3.org/1999/xhtml" \
55
+ --insert ' /x:html/x:body//x:section[@id="summary"]' --type elem --name section \
56
+ --append ' /x:html/x:body//x:section[@id="summary"]/preceding::section[1]' --type attr --name data-markdown --value " $$ {FILE}" \
57
+ --append ' /x:html/x:body//x:section[@id="summary"]/preceding::section[1]' --type attr --name data-separator --value " ^---$$ " \
58
+ --append ' /x:html/x:body//x:section[@id="summary"]/preceding::section[1]' --type attr --name data-vertical-separator --value " ^--$$ " \
59
+ --insert ' /x:html/x:body//x:section[@id="summary"]' --type text --name " " --value $$ ' \n' \
60
+ $@ ; \
61
+ done ; \
62
+ xmlstarlet ed --inplace -P -N x=" http://www.w3.org/1999/xhtml" \
63
+ --insert ' /x:html/x:body//x:section[@id="summary"]' --type text --name " " --value $$ ' \n' \
64
+ $@ ; \
65
+ yq eval ' .summary[] | "<li><span class=\"fa-li\"><i class=\"fa-duotone fa-" + .icon + "\"></i></span> " + .text + ")</li>"' $* .yaml \
66
+ | while read -r LINE; do \
67
+ xmlstarlet ed --inplace -P -N x=" http://www.w3.org/1999/xhtml" \
68
+ --subnode ' /x:html/x:body//x:section[@id="summary"]/x:ul[@id="bullets"]' --type text --name " " --value " $$ {LINE}" \
69
+ --subnode ' /x:html/x:body//x:section[@id="summary"]/x:ul[@id="bullets"]' --type text --name " " --value $$ ' \n' \
70
+ $@ ; \
71
+ done ; \
72
+ yq eval ' .events | reverse | .[] | .date + "<a href=\"" + .homepage + "\">" + .name + "</a>: <a href=\"" + .title + "\">" + .title + "</a>"' $* .yaml \
73
+ | while read -r LINE; do \
74
+ xmlstarlet ed --inplace -P -N x=" http://www.w3.org/1999/xhtml" \
75
+ --append ' /x:html/x:body//x:section[@id="summary"]/x:h3[@id="events"]' --type text --name " " --value " $$ {LINE}" \
76
+ --append ' /x:html/x:body//x:section[@id="summary"]/x:h3[@id="events"]' --type text --name " " --value $$ ' \n' \
77
+ $@ ; \
78
+ done
54
79
55
80
.PHONY :
56
81
web-$(COMMIT ) :
0 commit comments