💾 Archived View for benjaminja.info › gemlog › 2023 › 09 › 03-simple_site_gen captured on 2023-09-28 at 16:05:04. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-09-08)
-=-=-=-=-=-=-
2023-09-03 | @ttocsneb
It's been a while since I last posted. I have been busy working on my weatherstation. I'll need to write about that soon, but for now I want to talk about the state of my capsule.
During my breaks from the weatherstation, I have been working on my own site generator. I have finally got it to the point where I can start using it in production. There's definitely a lot of work left to be done before I can publish it for others to use.
I have been calling it `simple-site` for now, though I'll probably think of a better name when I actually release it. I have designed the generator to be as simple possible while allowing for complexity to come if desired.
The design starts out with templating. I designed my own simple templating engine that I found works surprisingly well. Each document will be rendered and passed to a chain of configured templates. To get added functionality, scripts can be created which will behave like functions in the templating engine. If you need more control, then generator scripts can be used to make alterations to the structure of the site.
Since I have migrated my capsule over to the new system, I have most likely missed a few things.
Here is a pretty simple example of what my generator does. Hopefully it can help visualize what's going on.
+- content | +- index.gmi | +- my-image.jpg +- templates | +- base.gmi +- site.toml
$ simple-site site.toml Rendering "index.gmi" with template "base.gmi" Copying "my-image.jpg"
capsule rendered on Mon, Sep 4, 05:46 +00:00, 2023