This post marks yet another iteration of my GitHub pages site.
The rationale is simple: previous iterations have proven either too simple and lacking in substance, or over-engineered and complicated. Further, sometimes they would come in an implementation or template that’s unfamiliar to me due to copy-pasting or cloning from other repositories, increasing the friction to actually create something for myself.
A New Purpose
Unlike previous versions of my blog, I’m hoping to make this new blog a home for the following:
- Commentary on select projects I’ve undertaken (whether public or private, personal or coursework)
- Reflections on my experience as an undergraduate through my modules or internships (and hopefully, my professional working life soon)
- Thoughts on emerging technology or development paradigms as I catch wind of them (if I have anything to say, that is)
- Other life stuff where I see fit
Which I haven’t really done previously. In addition to the blogging stuff this site will be home of the typical tech undergrad GitHub Pages site stack of my resumé, contact links, etc.
Technicals
Previously, I used Chad Baldwin’s template for creating a blog template, but I had the following issues with it:
It prescribed a workflow that was at once immemorable, not technical enough, and most importantly, not mine.
It used styling that critically was not mine, which had the effect of looking similar to not only his blog but to those belonging to others who also used his template.
Instead, I referred to this blog post for inspiration. I didn’t copy what the author prescribed wholesale, but I followed the principles the article was trying to suggest:
HTML, the “easy” way
I opted for raw HTML. This makes the website “mobile-friendly” by default, and somewhat easy for me to parse. However, writing raw HTML line by line and tag by tag is painful, boring, and disrupts any and all sorts of writing flow. So instead of writing all the HTML myself, I write everything in Markdown first, including some YAML front matter for the post title and date.
When I’m done writing a post, I run pandoc to convert the Markdown to HTML, using a HTML template to insert the header and footer to the body text, as well as inserting the data in the YAML front matter I created earlier.
I then edit the HTML if needed, as the converter does not always perfectly generate the HTML I envisioned in the Markdown file.
Indexing the Blog
I use a Python script to look at each blog post’s publish date,
then generate a HTML file that serves as an index.html
for the blog/ route.
To cover this process end to end for all posts, I run a bash script
that sequentially generates HTML from Markdown and creates the
index.html in the blog/ folder, without me
having to edit every single post’s HTML.
Moving Forward
I have now made a workflow that makes sense to me. Write the post, run the build script, and push the changes.
Hopefully this can only mean good things for my personal site moving forward, for being a blog that I want to write to, without the bells and whistles of every other framework, website service provider or template out there.
At present, there is no styling at all. I likely will add it in later down the line, but what matters to me right now is that the site is working and can render on any device.
The only thing left for me now is to stay curious and to remain committed to maintaining this thing.