Update installation instructions.
renderTemplate doesn't actually need to take an interface{} even though it's passing to one. Let's tighten up our side more.
Add hard breaks to the usage section with fold(1)
A small static blogging platform similar to many others.
Smallblog is a small project that assists in generating blogs and simple websites from a collection of markdown files. There are many other programs to accomplish similar things but I was not impressed by how quickly they grew in complexity. Smallblog is designed to be clean and simple while still easily hackable or extendable for those who require a very specific use case.
A sample of a website using smallblog is available here.
go install git.sr.ht/~abyxcos/smallblog@latest
Alternatively, this repository can be cloned and a local copy can be built with go build
. The smallblog
binary may then be copied around as desired.
Assuming the smallblog binary is now in the path, simply executng smallblog in a project directory will build the website in-place.
Alternatively, smallblog does take a handful of parameters and arguments that may assist in scripting it.
smallblog [-co] [--templates directory/] [--index blog/myblog.html] [projects/]
-c string
Path to your config file (default "templates/site.conf")
--index string
Path and filename for the generated index file in case you want
to provide your own landing page but still want to keep the index in a
separate folder/location (default "index.html")
-o string
Path to place your generated files in case you don't want to
co-mingle source and generated html (default "./")
--templates string
Path to your templates directory (default "templates/")
Smallblog requires both a templates directory and a config file with a few site-specific variables to generate a site. A default collection of templates has been included in the templates/
directory of this project, along with an example config file at templates/site.conf.sample
. A static/
directory containing a few basic css files referenced by the templates is also included for use.
Much of the generated site can be customized simply through the use of css, however for larger changes to the layout, smallblog uses the built-in golang templating system text/template. The documentation for this is not always the most intuitive, but hopefully the sample files provided act as a good base.
The issue tracker is available at https://todo.sr.ht/~abyxcos/smallblog
Smallblog is released under the ISC (2-BSD) license. Please see the LICENSE file for the full text.
The files in static/
are under the separate licenses of their authors and the full text has been included in the directory.