5 ms·
They do add stuff - that's the point, but limiting it to HTML boilerplate isn't all. My static generator: * Renders boilerplate * Builds the correct file pat
by shakna 9y ago
They do add stuff - that's the point, but limiting it to HTML boilerplate isn't all.
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.
- Santosh83 9y agoOut of curiosity, which static page generator is this? I'm especially interested in generating JSON for clientside search, freeing me from linking to Google...
- severine 9y agoJekyll: https://techtales.rocks/ https://techtales.rocks/ Not OP, but it's on their profile.
- shakna 9y agoThat's just what's up for now. I'm in the middle of rebuilding one I wrote around Pandoc, so I tossed Jekyll up for now, though Jekyll is capable of everything I described, I just don't like its way of doing things.
- shakna 9y agoOne I'm writing myself, but generating JSON for clientside search is actually fairly simple with most generators. 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/ http://mathayward.com/jekyll-search/ [1] https://github.com/mathaywarduk/jekyll-search https://github.com/mathaywarduk/jekyll-search [2] https://lunrjs.com/docs/index.html https://lunrjs.com/docs/index.html