Summary Files Commits Branches @commit @diff @stats
AgeCommit messageAuthorLinesSHA
2025-03-03feat: Preliminary implementation of footnotes singleton
 Syndamia Verified
-8/+517ddce59
2025-03-03fix(parser): Close paragraph in END
 Syndamia Verified
-0/+326d11dc
2025-03-03fix(parser): Fix end paragraph tag being placed after ending code pre
 Syndamia Verified
-0/+1af8acb8
[...]
 
 
Clone
https://git.syndamia.com/archive/csg
git@syndamia.com:archive/csg
 
BranchAge
singleton20 months
6-stage2 years
main3 years
NameSize
.gitignore29 Blog stats plain blame
LICENSE1.0 KiBlog stats plain blame
README.md3.5 KiBlog stats plain blame
csg4.2 KiBlog stats plain blame
demo110 Blog stats plain
md-extensions76 Blog stats plain
md-meta.awk1.5 KiBlog stats plain blame
md-parser.awk17.5 KiBlog stats plain blame

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.