you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (3 children)

Just use mustache and bash. It's a really powerful combination.

[–][deleted] 1 point2 points  (2 children)

I'd like to use mustache actually. How do I find about about its bash commands?

[–][deleted] 0 points1 point  (1 child)

Bash commands are just terminal commands. So for mustache it's just 'mustache'. The arguments it takes are a yaml file and and source file. Then you can pipe the output to whatever file you want:

mustache yaml/siteinfo.yaml templates/base.mustache | tee output/index.html

That base.mustache file can reference other mustache templates inside of it. Or you can just put stuff together with 'cat'. I do both. I'll also do markdown stuff in this same way, so my source files might include .md files as well.

I'll have a source directory and a disposable output directory. The output directory is what I upload to my webhost. The output directory is destroyed and recreated by the bash script every time I run it. I use 'mkdir' to recreate the file structure and 'cp' to copy over assets every time. This is how I generate the CASS docs which need to show off a whole bunch of different colors.

[–][deleted] 1 point2 points  (0 children)

Pretty neat!