Is there a particular problem you’ve run into trying to build such a program?
In general, this type of website builder is called “static site generator” because the exported files do not require a server back-end that handles changing logic. The logic is applied at “compile” time, when the HTML/CSS files are initially generated before they are uploaded to a hosting service.
The key steps are:
- Load content data
- Apply a set of templates
I wrote a simple one in Go that does exactly this.
More production-ready ones have all kinds of additional steps in-between and may provide utilities like hot-reloading or serving to help you preview the website.
From the requirements you’ve posted, I can gather the following:
- Load content in yml format.
- Apply a template that uses curly brace syntax as placeholders.
- The user updates by committing their yml file into a forked repo and pushes to GitHub or GitLab, where it gets hosted on GitHub/GitLab pages.
For 1, I would suggest: https://github.com/nodeca/js-yaml
For 2, it looks like this matches your desired syntax best: https://github.com/shinesolutions/jazz
For 3, I would suggest to, by default, save the generated HTML/CSS files into a
docs folder so that GitHub pages can detect it and host with minimal work on your part. The tradeoff here is that the user would need to build their website locally and commit those files directly into the forked repo. Another option is to push the generated files into a
gh-pages branch separate from the main source code.
* This “User can update and it updates on the site” part requires several steps to handle the deployment.
Update: Here’s a Glitch project that shows the yml->html generator flow: https://glitch.com/edit/#!/remix/rainbow-van