Images are stored in `images/`.
They are not part of the repository but posts may reference them.
+### Posts
+
+All blog posts should have the following format:
+
+File name: `yyyy-mm-dd-summary-of-post.md`
+
+Line 1: Title of post as h1
+Line 2: Date of post (yyyy-mm-dd) as h2
+
## License
This program is distributed under the terms of the MIT License.
DATE=$(date)
URL="https://krickl.dev"
AUTHOR="Lukas Krickl"
+EMAIL="lukas@krickl.dev"
write_atom '<?xml version="1.0" encoding="utf-8"?>'
write_atom '<feed xmlns="http://www.w3.org/2005/Atom">'
for f in *.md; do
BASENAME=$(basename $f ".md")
UPDATED=$(date -r $f)
+ CONTENT=$(cat "$f")
+ TITLE=$(cat "$f" | head -n 1)
+
write_atom ' <entry>'
write_atom " <id>$URL/blog/$BASENAME.html</id>"
write_atom " <link rel=\"alternate\" href=\"/blog/$BASENAME.html\" />"
- write_atom " <title>$BASENAME</title>"
- write_atom " <author><name>$AUTHOR</name></author>"
+ write_atom " <title type=\"text\">$TITLE</title>"
+ write_atom " <content type=\"text\">$CONTENT</content>"
+ write_atom " <author><name>$AUTHOR</name><email>$EMAIL</email></author>"
write_atom " <updated>$UPDATED</updated>"
write_atom ' </entry>'
done