[onnilampi.fi] [blog] [keys]
In the past, this blog hasn't been too image-heavy. This is probably not changing in the future, but still, only adding a few images proved to be a bit cumbersome with the existing tooling. To help with this, I created a simple macro that can be called to template an image in a neat fashion.
In addition to making the image inclusions a bit easier, the templating macro also allows for adding additional validations. One of the most important design principles for me in this website project has been to ensure that a successful site generation means that things are at least not horribly broken. It is better to fail the site generation if there is a risk of including broken links to the site's own content, for example. For the images, there are three rounds of validations:
posts.yml. These declarations are then easy to check and make sure that for each image, there is a corresponding regular file present at the location we expect it to be.An additional improvement was the inclusion of a Makefile, which automates several operations related to the site development.
It's not like having to run a few playbooks every now and then is that hard, but it is neat to simply type make watch into a terminal and have the site be automatically generated when updates are saved to local disk.
In addition, there is a separate instruction set for generating the real site, which will in the future be expanded with more instructions on how to create a version of the site to be served in other means than the traditional internet.
Currently, I'm mainly looking into making the site available through Tor and sneakerweb.