3 ms·
If it's more than two pages I'd use one just because I hate copy-pasting stuff for headers/footers. I know vanilla PHP allows templating but static hosts can't
by wishinghand 6y ago
If it's more than two pages I'd use one just because I hate copy-pasting stuff for headers/footers. I know vanilla PHP allows templating but static hosts can't run that. If only HTML allowed for importing fragments.
- jccooper 6y agoSomething like staticjinja makes simple edit-side templating quite reasonable. It even does live rebuilding. Nice simple lightweight way to do static site building if you don't need all the CMS-type stuff. https://github.com/staticjinja/staticjinja https://github.com/staticjinja/staticjinja
- tasogare 6y agoYou can use PHP while hosting in static if you generate all the pages upfront. This is what I do for my website (3 pages, soon 4, for i18n). In addition of i18n, it allows me to generate most of the tedious context by factoring them in functions. I build with a 4 lines script, and upload with another.
- freetonik 6y agoI found Sergey[0] a great solution for this one particular problem. [0]. https://sergey.cool/ https://sergey.cool/