Introducing Picosite
20 Sep 2024
Introducing...
I'm excited to announce Picosite, the latest addition to the range of static site generators built with Dart! But why another one? after all there are already several static site generators built with Dart, I should know as I've been maintaining one of them: DSG, for several years. Well the answer to that is actually that I wanted a replacement for DSG which is quite an old and crusty codebase which I didn't want to go to all the effort of trying to modernise, while when I looked around at the other existing Dart static site generators, none of them meet all my requirements of:
- using Handlebars logic-less templating
- simple, minimal configuration
- Markdown with extensions such as tables & section IDs
- compiled to single standalone binary for easy distribution
That last one is especially important to me and was what ruled out even trying to modify for my needs something like static shock, the other new entrant in this category, which sadly due to the design choices made for it for extensibility I believe will never be able to be distributed as a single standalone executable.
Features
So now I've run through the reasons for Picosite's existence, what features does it have? Here is a quick run down:
- Content pages in Markdown format (with extensions such as tables)
- Markdown pages specify variables in YAML FrontMatter
- Markdown content files are processed through Handlebars templates
- Automatic recursive copying of static assets files to final output directory
- Preview webserver with watching for content & template file modifications for automatic rebuilds
And the surprising this is that all the above functionality, including "overheads" such as command line parameter parsing, took only a mere 367 lines of Dart code to implement!
The Future
While the current feature set of Picosite is already enough for me to use it to publish the upcoming new user manual for the picoTracker, I do have plans to add a few more small pieces of functionality such as builtin and user provided data for template variables.
In the meantime, I hope you might find Picosite useful for you static site publishing needs, perhaps to quickly create some documentation for your favourite project or Dart package. And if you find any bugs or have features suggestions, please do file an issue! :-)