mercredi 14 février 2018

Generate multiple static sites from DB content

I have a requirement to take text content (including image file location on local drive) that is stored in a database and build several different versions of a static web site from it. The idea being that a user could enter page content through a form (e.g. "about me text"), choose a layout, and the tool will combine them and generate a set of static HTML page and load it to the hosting environment. They could then choose a different layout / template, modify the content, and re-upload it, overwriting the existing site.

I don't want to use Wordpress or any other CMS for a number of reasons. This needs to be dead simple for non-tech users to just put text in a form, select a theme, and click a button.

My first thought was to just find some static site templates and swap out the content with my own tags and just do a search and replace in them before I push it, which I could easily do with a script. I then started looking at Jekyll and other static site generators and I'm not sure if they add more complexity that the value they provide and even IF they could combine straight text content into their templates.

Anyone have any thoughts as to the best route to go here?




Aucun commentaire:

Enregistrer un commentaire