Posted on 2021-07-15
Updated December 2021
My website is alive! I’m excited to finally have a space on the internet dedicated to my programming. I intend to start a Youtube channel with some programming content soon, and might do some coding streams on Twitch. This is the beginning of my online “brand”.
I’m launching this site using Netlify’s static site hosting. This has worked well for me in the past, and is a good simple option for a site like this - static content which is built once at runtime using simple scripts.
I have been playing around with different simple layouts for a while, and compared a few static site generators like Jekyll and makefile-blog but ultimately decided to build my own generator. I don’t need many bells and whistles.
The source for this site is on github.
The first part of the generator builds the main pages. These are the things you reach from the navigation at the top of the page, such as index.html
or projects.html
. These main body of these pages are written in the src/
directory, but the common header and footer components are stored in tmp-header.html
and tmp-footer.html
. A full page is generated by concatenating the header, page body and footer. From make-site.sh
:
cat "src/tmp-header.html" "$1" "src/tmp-footer.html"
Blog posts are a tiny bit more involved. The content is authored in Markdown, then rendered to HTML using pandoc
using a pandoc
template src/tmp-blog-post.html
. This is then concatenated with the header and footer, like any other page. Blog posts have special metadata that other pages do not. This will hopefully be expanded in the future, and can be used to generate things such as RSS feeds.
As of late 2021 I have added RSS feeds to this site. I wrote a simple script to generate feeds, but it is missing lots of quality of life. For example, I should include the post body in the feed as most blogs seem to do.