My static generator:
* Renders boilerplate
* Builds the correct file paths
* Generates a JSON tree for a clientside search engine
* Generates a RSS feed
* Creates a global navigation menu
* Examines all my code blocks, and if they're valid, also renders output into the finished file
* Spelling and grammar checks my pages
I could do all that manually, but it'd be a pain and take a lot longer.
Not OP, but it's on their profile.
Like this quick and easy Jekyll article [0][1].
It all kinda depends how detailed you need your search engine to be. Fuzzy matching requires a little bit more JS. My go-to is lunr.js [2] to take care of all of that for me.
But basically all you need is a page that can iterate over all other pages that exist, (like a TOC would), and that can plug on the data into your search function for you.
[0] http://mathayward.com/jekyll-search/
I want an automatic table of contents.
Source code highlighting is nice too.
I use mdbook and not Jekyll anymore, but it's similar stuff.
Really? Well, this is just personal preference. I actually find html clearer for very simple documents. There are so many different markdown flavors that it is in practice rather ambiguous. You cannot easily copy markdown text from one conntext to another. For html, it is much easier.
> I want an automatic table of contents.
That's a really good reason, and probably the only reason that i can imagine to use generators.
> Source code highlighting is nice too.
I have been beaten not once, not twice, but three times by silent changes in jekyll setups that changed the rendering of my code (so everything looked really bad, with negative red blocks, etc). I hated this so much, and was so enraged, that I converted all my documents to pure html and now I am much happier. The reasons for the changes that broke my pages were completely banal ones, like moving from pygments to ruby-whatever (or vice-versa), etc.
Just use ones that follow http://commonmark.org/ They should render the same.
I don't really love Jekyll either, that's why I have my own generator written in Node, and my dependencies are defined strictly in my package.json to keep things like markdown parsing from breaking.
Heck, generators can just be a sh script with some sed commands.
For instance, you can write
> {% note %} Something I want to emphasize {% endnote %}
And this will be converted by the generator into a properly-styled <div> according to your theme. If you change the theme, another run of the generator will convert the note to a different style, without you needing to change your content.
an <em> emphasized </em> word
and then you style the tag however you want. You just change the .css file, no need to rerun anything.In your HTML document, you would need to change the structure manually for each content file, of which you can have thousands.