summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-12-04 16:08:27 -0500
committerAdam T. Carpenter <atc@53hor.net>2020-12-04 16:08:27 -0500
commit8d90867868b86c53b8cf7bc88d5f188ab7ccd58e (patch)
treec472e8a699424f263a74ad899be2cbe7db9c39a6 /Makefile
parent9c291414569286c47526f9c014ef954763baa898 (diff)
download53hor-8d90867868b86c53b8cf7bc88d5f188ab7ccd58e.tar.xz
53hor-8d90867868b86c53b8cf7bc88d5f188ab7ccd58e.zip
makefile automatically inserts title into template, added aoc2020
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1571a60..b8b9e14 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ post:
mkdir -p posts/$$CATEGORY; \
FILENAME=posts/$$CATEGORY/$$SHORT_DATE-`echo $$TITLE | tr "[:upper:]" "[:lower:]" | tr "[:blank:]" -`.html; \
cp $(TEMPLATE) $$FILENAME; \
+ sed -i '' "s/{{ title }}/$$TITLE/g" $$FILENAME; \
$$EDITOR $$FILENAME; \
sed -i '' "s#</channel> </rss>#<item> <title>$$TITLE</title> <pubDate>$$LONG_DATE</pubDate> <link>https://www.53hor.net/$$FILENAME</link> <guid>https://www.53hor.net/$$FILENAME</guid> </item>\n</channel> </rss>#" rss.xml; \
sed -i '' "s#<ul id=\"index\">#<ul id=\"index\">\n<li> <a href=\"/$$FILENAME\">$$TITLE <code>$$LONG_DATE</code> </a> </li>#" index.html