I started out with Server Side Includes on a shared host, but converted to using PHP along the way to be able to make a base file with all the stuff that is repeated (header, main, footer etc), and then injecting the content from index.php, /contact/index.php etc.
I have a static file download only webapp[1], and I managed to get the includes done with only a 99-line JS component.
Honestly, once you get a decent way to specify, in HTML tags, include files, a significant portion of what you use a framework for (DRY) becomes redundant.
[1] Dynamic data to hydrate elements on the page is via API-only URLs.
Comments
I have a static file download only webapp[1], and I managed to get the includes done with only a 99-line JS component.
Honestly, once you get a decent way to specify, in HTML tags, include files, a significant portion of what you use a framework for (DRY) becomes redundant.
[1] Dynamic data to hydrate elements on the page is via API-only URLs.