Summary Files Commits Branches @commit @diff @stats
NameSize
.gitignore29 Blog stats plain blame
LICENSE1.0 KiBlog stats plain blame
README.md5.7 KiBlog stats plain blame
csg8.8 KiBlog stats plain blame
demo68 Blog stats plain

csg

csg is the "complicated (static) site generator". It's a Markdown-based static site generator, which aims to be simple, small, extensible and fully POSIX-compliant.

The primary provided features are:

  • Markdown conversion, supporting the original spec and some common extensions like nested lists or fenced code-blocks
  • Customizing the Markdown conversion, allowing you to add elements around blocks
  • Customizing the resultant HTML with access to a variety of variables, including:
  • word count
  • (optional) git-based "created" and "edited" timestamps
  • Page title and description, based on document and user-customizable format string

Getting started

TODO

Documentation

TODO

Limitations and alternatives

The biggest bottleneck when using csg is the AWK-based Markdown converter. sed isn't powerful enough for the task and POSIX-compliant C will result in enormous code.

From my research, only one other person has worked on an AWK-based converter: Jesús Galán López. His converter, md2html.awk, supports only a subset of Markdown and, in my subjective opinion, isn't at all simple or extensible (though it may be faster).

However, it has been used in multiple other POSIX-compliant site generators:

Other POSIX-compliant site generators:

Name Author Page markup Parser
ssg Roman Zolotarev Markdown (external)
rawk Kyle Isom Markdown (external)
Pharox caffeine HTML -
makesite Matthías Ragnarsson HTML -
suna fuku77 Markdown interpreter, small subset of Markdown
dwfwb Supphakit Duanghoy smu (external)

Other shell (probably bash) site generators:

Name Author Page markup Parser
sw Roi Martin HTML -
dsw Dan Rinaldi Any (external)
bashblog Carlos Fenollosa Markdown (external)
utterson Stefan Marsiske HTML -
vee pifty TXT -
NanoBlogger n1xt3r HTML -
simsalabash Markus Fisch HTML -
statix plugnburn HTML -

Most work directly with HTML or use an external Markdown parser.

A really good C-based parser is lowdown by Kristaps Dzonsons.