|
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| Name | Size | |
|---|---|---|
| .gitignore | 29 B | log stats plain blame |
| LICENSE | 1.0 KiB | log stats plain blame |
| README.md | 3.5 KiB | log stats plain blame |
| csg | 4.2 KiB | log stats plain blame |
| demo | 110 B | log stats plain |
| md-extensions | 76 B | log stats plain |
| md-meta.awk | 1.5 KiB | log stats plain blame |
| md-parser.awk | 17.5 KiB | log 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.
