I have a static website with lots of similar pages. The site is very simple, basically just some information for me and a few other people. I'd basically like to spend as little time as possible maintaining it.
Certain pieces show up on every page, and change every so often (the header and footer, for example, but other similar pieces are repeated too). I currently copy-paste them on every page they appear on, but this obviously is error-prone and is very frustrating for me to maintain.
My initial thought was JS to load similar pieces of the site, but this feels like overkill for such a simple site, and makes reading the site offline (in a text editor or terminal for example) a giant pain because one has to jump between different files.
My second thought was to just use the C preprocessor to generate the HTML files, for example doing #include "repeated_section.html" and a few macros to build up the HTML from pieces. This seems to work well, (the generated HTML works, and is nice and readable in a text editor), but feels kind of hackey. Is there a "proper" tool for doing this? Has anyone tried my way and run into any problems?