This time it was a small Ruby file that attaches a header and a footer to static .html files and dumps them in a production folder.
Means I can still handwrite all my pages but then update the headers and footers across the board in one foul swoop.
(secretly proud of myself)
@mikael where’s the fun in that? 🤣🤣
I knew you could do includes with .php files. Never even considered you could do it with .html files. Always thought is was because of the dynamic part.
Thanks for the heads up. 👍🏼
@minimaldotclick You should be proud! However, I feel obliged to mention that Server Side Includes are available on almost every web server and is very underused.
As simple as this (no build step needed):
<!--#include virtual="header.html" -->
https://en.wikipedia.org/wiki/Server_Side_Includes