summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-11-29 22:16:57 -0500
committerAdam T. Carpenter <atc@53hor.net>2020-11-29 22:16:57 -0500
commit015c3a1d7cd0a1f68e70bf3e1254ec541ea16ae5 (patch)
tree54323de041d3f6917a99521907b7173947acc2f2
parentaa6ade8c1bc51bc8f379442bb00710438d1385fd (diff)
download53hor-015c3a1d7cd0a1f68e70bf3e1254ec541ea16ae5.tar.xz
53hor-015c3a1d7cd0a1f68e70bf3e1254ec541ea16ae5.zip
moved template to templates, updated makefile
-rw-r--r--Makefile29
-rw-r--r--favicon.icobin0 -> 53694 bytes
-rw-r--r--templates/template.html (renamed from template.html)26
3 files changed, 17 insertions, 38 deletions
diff --git a/Makefile b/Makefile
index 6a26510..2f822c0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,24 +1,27 @@
-# simple date to RFC date:
-# date -j -f "%Y-%m-%d" -R 2020-10-29
+# Written for FreeBSD make(1), or pmake. Not tested with GNU make.
-all:
- echo done.
+TEMPLATE = templates/template.html
+RSS_TEMPLATE = templates/rss.xml
-serve:
+.PHONY: all clean serve post
+
+serve: all
python3.7 -m http.server 3000
-resume:
- echo unimplemented!
+clean:
+ rm -f index.html
+ rm -f rss.xml
+
+profile/adamcarpenter.pdf: profile/adamcarpenter.html
+ touch profile/adamcarpenter.pdf
-post:
+post: clean
@read -p "Title: " TITLE; \
read -p "Category: " CATEGORY; \
SHORT_DATE=`date +"%Y-%m-%d"`; \
LONG_DATE=`date -R`; \
- mkdir -p posts/$$category; \
- FILENAME=posts/$$category/`date +"%Y-%m-%d-"``echo $$title | tr "[:upper:]" "[:lower:]" | tr "[:blank:]" -`.html; \
+ mkdir -p posts/$$CATEGORY; \
+ FILENAME=posts/$$CATEGORY/`date +"%Y-%m-%d-"``echo $$TITLE | tr "[:upper:]" "[:lower:]" | tr "[:blank:]" -`.html; \
+ cp $(TEMPLATE) $$FILENAME; \
$$EDITOR $$FILENAME; \
- sed -i .bak '5 a\
- <item> <title>$$TITLE</title> <link>https://www.53hor.net/$$FILENAME</link> <guid>https://www.53hor.net/$$FILENAME</guid> <pubDate>$$LONG_DATE</pubDate> </item>
- ' rss.xml
diff --git a/favicon.ico b/favicon.ico
new file mode 100644
index 0000000..c6c9d94
--- /dev/null
+++ b/favicon.ico
Binary files differ
diff --git a/template.html b/templates/template.html
index 568fe5c..ef925d0 100644
--- a/template.html
+++ b/templates/template.html
@@ -63,31 +63,7 @@
{{ title }}
</h1>
- <p class="description">
- {{ description }}
- </p>
-
- <ul>
- <li>This is what</li>
- <li>List items</li>
- <li>Look like</li>
- </ul>
-
- {{ article }}
-
- <pre>
- <code>
-int sample_code() {
- let x = 1;
- let y = x;
- return 0;
-}
- </code>
- </pre>
-
- <blockquote cite="wikipedia.org is a terrible primary source">
- {{ blockquote }}
- </blockquote>
+ {{ content }}
</article>
</body>
</html>