-_site
-.sass-cache
-.jekyll-cache
-.jekyll-metadata
-vendor
+blog/*.html
+atom.xml
## Usage
+To convert all blog posts from markdown to html run the following command.
+This will also create an atom feed.
+
+```bash
+./md2html.sh
+```
+
## License
This program is distributed under the terms of the MIT License.
--- /dev/null
+<!DOCTYPE html>
+<html>
+
+<head>
+ <title>krickl.dev</title>
+ <meta name="description" content="Lukas Krickl's personal page">
+ <meta name="keywords"
+ content="C, programming, lua, games, engine-dev, game-dev, indie, foss, open-source, git, linux">
+ <meta name="author" content="Lukas Krickl">
+ <meta charset="utf-8" />
+</head>
+
+<body>
+ <h1>krickl.dev</h1>
+
+ <article>
+ <h2>Posts</h2>
+ <ul>
+ <li><a href="./blog/2025-06-22-hello-blog.html">2025-06-22 Hello Blog</a></li>
+ </ul>
+ </article>
+
+ <a href="./contact.html" >Contact</a>
+</body>
+
+</html>
--- /dev/null
+# Hello Blog
+
+## 2025-06-22
+
+This is my first post on my new blog.
+The blog engine itself is rather simple. I use pandoc to convert markdown files to basic html.
+I also generate a simple atom feed with all entries.
+
+This blog will soon serve as a devlog for my gameboy game!
+
+Hope to be posting more soon :)
--- /dev/null
+<!DOCTYPE html>
+<html>
+
+<head>
+ <h1>Contact</h1>
+ <ul>
+ <li>Lukas Krickl</a>
+ <li>email: <a href="mailto:lukas@krickl.dev">lukas@krickl.dev</a></li>
+ <li>mastodon: <a href="https://social.linux.pizza/deck/@unlink2">@unlink2@social.linux.pizza</a></li>
+ </ul>
+</body>
+
+</html>
<h1>krickl.dev</h1>
<article>
- <h2><a href="https://git.krickl.dev/?p=ulas/.git;a=tree">ulas</a></h2>
+ <h2><a href="./blog.html">Blog</a></h2>
+ </article>
+
+ <article>
+ <h2>Projects</h2>
+
+ <h3><a href="https://git.krickl.dev/?p=ulas/.git;a=tree">ulas</a></h3>
<p>
Ulas is a assembler for the sm83 cpu.
It currently supports direct assembly without a linking step and will in the future also offer
a disassembler as well as a debugger interface.
</p>
- </article>
- <article>
- <h2><a href="https://git.krickl.dev/?p=gbrg/.git;a=summary">gbrg</a></h2>
+ <h3><a href="https://git.krickl.dev/?p=gbrg/.git;a=summary">gbrg</a></h3>
<p>
Gbrg is a turn-based rpg for the gameboy written in ulas.
It serves as a demo project for the assembler.
</p>
</article>
+
+ <article>
+ <h2>Links</h2>
+ <ul>
+ <li><a href="https://git.krickl.dev">git</a></li>
+ <li><a href="https://codeberg.org/unlink2">codeberg</a></li>
+ <li><a href="gemini://krickl.dev">unlink2's capsule</a></li>
+ </ul>
+ </article>
- <h2>Links</h2>
- <ul>
- <li><a href="https://git.krickl.dev">git</a></li>
- <li><a href="https://codeberg.org/unlink2">codeberg</a></li>
- <li><a href="gemini://krickl.dev">unlink2's capsule</a></li>
- </ul>
- <h2>Contact</h2>
- <ul>
- <li>email: <a href="mailto:lukas@krickl.dev">lukas@krickl.dev</a></li>
- <li>mastodon: <a href="https://social.linux.pizza/deck/@unlink2">@unlink2@social.linux.pizza</a></li>
- </ul>
+ <a href="./contact.html" >Contact</a>
</body>
</html>
--- /dev/null
+#!/bin/sh
+
+set -e
+
+# This script takes all pages in ./blog/*.md and converts
+# it to markdown using pandoc
+# It also creates an atom feed
+
+# convert blog to html
+
+cd ./blog
+for f in *.md; do
+ BASENAME=$(basename $f ".md")
+ pandoc -f markdown $f > "./$BASENAME.html"
+done
+
+# create atom feed
+
+write_atom() {
+ printf "$1\n" >> ./atom.xml
+}
+
+printf '' > ./atom.xml
+
+DATE=$(date)
+URL="https://krickl.dev"
+AUTHOR="Lukas Krickl"
+
+write_atom '<?xml version="1.0" encoding="utf-8"?>'
+write_atom '<feed xmlns="http://www.w3.org/2005/Atom">'
+
+write_atom " <title>$URL</title>"
+write_atom " <link href="$URL/blog/atom.xml" rel="self" />"
+write_atom " <link href="$URL" />"
+write_atom " <id>$URL</id>"
+write_atom " <updated>$DATE</updated>"
+for f in *.md; do
+ BASENAME=$(basename $f ".md")
+ UPDATED=$(date -r $f)
+ 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 " <updated>$UPDATED</updated>"
+ write_atom ' </entry>'
+done
+
+write_atom '</feed>'