|
|
|
|
|
by insky
4399 days ago
|
|
I wrote a quick shell one liner that aggregates text files and simple templates into resulting html files. find ./txt/ -type f -name '*.txt' -print0 | xargs -0 -I£ sh -c 'newname=$(basename £ .txt).html; cat templates/header.html £ templates/footer.html > html/$newname'
Each new page (html file) is a sandwich. The filling could be transformed markdown rather than plain text. A little find and replace for titles, and such like would make for quite an easy static site generator.I even found a bash markdown transformer: https://github.com/chadbraunduin/markdown.bash |
|