diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -25,7 +25,7 @@ SOURCES=$(wildcard src/*.md) $(BLOG_SOURCES) TMP_HTML=$(patsubst src/%.md, tmp/%.content.html, $(SOURCES)) HTML=$(patsubst src/%.md, out/%.html, $(SOURCES)) -BLOG_XML=$(patsubst src/%.md, tmp/%.xml, $(BLOG_SOURCES)) +BLOG_XML=$(patsubst src/%.md, tmp/%.xml, $(filter-out src/blog/index.md, $(BLOG_SOURCES))) PUBLIC_SOURCES=$(shell find src/public -type f) PUBLIC=$(patsubst src/%, out/%, $(PUBLIC_SOURCES)) @@ -68,6 +68,10 @@ tmp/%.meta.title: src/%.md sed '/^#/q' $< | sed 's/#* //' > $@ @echo "| $(WEBSITE_TITLE)" >> $@ +tmp/blog/%.meta.date: src/blog/%.md + @mkdir -p $(@D) + @date --rfc-email -d $* > $@ + tmp/blog/preview.md: src/blog/index.md @mkdir -p $(@D) sed -n "s/^-/ -/; s|(|(blog/| ; /^ -/p" $< | head -n 4 > $@ @@ -82,12 +86,13 @@ $(RSS): $(BLOG_XML) $(RSS_TEMPLATE) -e "a <lastPubDate>$$(date --rfc-email)<\/lastPubDate>" \ -e '}' $@ -tmp/%.xml: tmp/%.content.html tmp/%.meta.title $(RSS_ITEM_TEMPLATE) +tmp/%.xml: tmp/%.content.html tmp/%.meta.title tmp/%.meta.date $(RSS_ITEM_TEMPLATE) @mkdir -p $(@D) sed "/CDATA/r $<" $(RSS_ITEM_TEMPLATE) > $@ sed -i \ -e '/<item>/{' \ -e 'a <title>' -e "r tmp/$*.meta.title" -e 'a <\/title>' \ + -e 'a <pubDate>' -e "r tmp/$*.meta.date" -e 'a <\/pubDate>' \ -e "a <link>$(WEBSITE_URL)/$*.html<\/link>" \ -e '}' $@ @@ -97,7 +102,7 @@ $(OPENRING_FOOTER): $(OPENRING_TEMPLATE) out/public/%: src/public/% @mkdir -p $(@D) - cp $^ $@ + @cp $^ $@ out/public/emoji/%.png: src/public/emoji/%.png @mkdir -p $(@D) |