HugoNikanors blogg‽

A blog about nothing, but mostly itself.

Hugo Hörnquist 27 Feb 2023
Lästid: 1 minut(er)

Yet Another Static Site Generator

I recently released my very own static site generator! For the time being simply called ssg. It supports pages, templates, entries, and static files. But its "selling point" is its widget system.

A widget is reference to a (small) code fragment which can be referenced from a pages source code, for example:

Contact me at [[mailto:hugo@example.com]].

Would expand through the following widget

(define (widget address)
  (delay
    `(a (@ (href "mailto:" ,address)) ,address)))

Which eventually would resolve into

Contact me at <a href="mailto:hugo@example.com">hugo@example.com</a>.

It remains to see if rolling your own site generator is a good idea, or if I should take time to actually learn some existing ones. This blog switching to SSG would be a good indicator that I at least believe a bit in it.

Source Code: https://git.lysator.liu.se/hugo/ssg
A page using the system: https://for3.lysator.liu.se (Archived version)


RSS RSS-feed to see more like this.
About Contact Legal Q&A