4 ms·
I’m not happy with the static site generator offerings. Some require a bunch of dependencies like ruby. I guess that’s not so bad now I know docker. But they al
by quickthrower2 8y ago
I’m not happy with the static site generator offerings. Some require a bunch of dependencies like ruby. I guess that’s not so bad now I know docker. But they all have some system of generating from templates that feels limited and annoying. Something I thought of that I’d make if I got time is a simple static site generator based on a JSON data model (that can pull in markdown references). This gets fed into a function in JS that you write to convert that into a bunch of files ie your website. This makes it 100% hackable in a familiar and general purpose language - JS, with the ability to use any template system eg handlebars or hell... just backticks. You’d have the whole Node ecosystem at your disposal or even call out to other exes such as pandoc.
- ThePhysicist 8y agoI built something like this for myself as I was unsatisfied with systems like pelican or jekyll. Currently it’s not documented at all but you can have a look at it here: https://github.com/adewes/beam-up https://github.com/adewes/beam-up It’s a very simple system that relies on Yaml files for configuration and uses plugin-based builders and processors (e.g. for Markdown or Jinja). We use it for all our production sites (e.g. https://gdpr.dpkit.com https://gdpr.dpkit.com, source at https://github.com/dpkit/gdpr-portal https://github.com/dpkit/gdpr-portal) and it works very well without getting in the way. If there would be some interest I’d be happy to write up some docs for it, right now I’m just scratching my own itch with it.
- oblomovshchina 8y agoI think I wrote what you’re talking about for private use. You give it a folder where you have all your data arranged in markdown files and it outputs a JSON. You can specify which view component you want to render any given piece of content. It also preserves your flat file structure and maps it on the router. Is this close to what you’re looking for?