Hirozed dot me is PHP
Originally, I used Bradley Taunt's barf script, but there was one snag or another would come up, preventing me from just writing posts. I looked around for other static site generators, but they all seemed too overly complicated for this very small, simple blog. Then an "a ha" moment struck me. I'm a PHP developer, I know html, I can just create my own.
I decided that I didn't need something complicated, and it doesn't necessarily have to convert anything to html. I'm hosting this blog on NearlyFreeSpeech, which lo and behold, provides PHP. So, all I need to do is whip up some supporting files and a simple template, and I'm off to the races.
This is the structure:├── _assets │ ├── _template │ │ ├── content.html │ │ └── index.php │ ├── fonts │ │ └── index.php │ ├── img │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-512x512.png │ │ ├── apple-touch-icon.png │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ └── index.php │ ├── index.php │ ├── php │ │ ├── head.php │ │ ├── index.php │ │ ├── posts.php │ │ └── toes.php │ └── styles ├── [top-level-page] │ └── index.php ├── index.php ├── posts │ ├── [a-post] │ │ ├── content.html │ │ └── index.php ├── rss │ └── index.php
The top level pages (about,uses) is an index.php file, adding the header, footer, with the content in html in the middle.
The posts.php
file contains a couple utility functions that builds the list of posts on the home page, as well as the rss feed.
The post/index.php
is just a few require statements for the header, content, and footer (toes 😁️). The content.html
file is the content of the post (go figure). The reason to split out the content from the index file is so that the posts utility functions can do some DOMDocument walking to get the title and date for the home and rss pages.
Lastly, the rss folder handles the rss feed, where folks can subscribe to my infrequent rambling. My apologies to those who have already subscribed, any future updates will keep the same rss structure.
Is this an easier way for a blog to be set up, probably not. I'm sure there are easier ways to handle it. However, this is something that I can maintain, and I know how everything is running. The amount of effort it takes to write html feels to be the same as markdown. I'm not writing anything complex, so I can just use my IDE's html completions as an assist. I'm still not sure how timely I will be in creating posts, but now this site isn't going to be the obstacle.