3 ms·
You don't need even a static generator really, even just cat header.html page1.html footer.html > build/page1.html would work
by runald 6y ago
You don't need even a static generator really, even just
cat header.html page1.html footer.html > build/page1.html
would work
- hu3 6y agoThis is such a simple yet powerful idea I don't know how could I not think of that before. Thanks. 'cat' will be my static site generator.
- Kye 6y agoI put together something like this with PHP, like how I did websites in ancient times with SSI[1], but it output a static site. It never occurred to me I could just cat them. I could even still use PHP or any language to generate some components and just cat the output with the others into one file. That would help people who prefer to write in markdown. Just run it through a markdown->HTML converter and output it to a file with header and footer included. [1] https://en.wikipedia.org/wiki/Server_Side_Includes https://en.wikipedia.org/wiki/Server_Side_Includes