Pure HTML, CSS, and vanilla JS. And a few files organized in a few folders. And upload.
Why must even a static site in 2024 require Python, libraries, framework dependencies, build steps, etc?
Pure HTML, CSS, and vanilla JS. And a few files organized in a few folders. And upload.
Why must even a static site in 2024 require Python, libraries, framework dependencies, build steps, etc?
The compromise between functionality and convenience since then has been creating frameworks that do these types of post-build steps to give modern functionality (templating, search, accessability options, dynamic theming, reusable custom components, ...) without compromising that idea, while still allowing flexibility on the presentation. Some go too far in either direction and lose the intent, some barely need that flexibility at all and would better be served with pure html.
And because even in 2024, good SEO requires that the content be directly in the HTML source, even without JavaScript.
Also there is no such "old fashioned way". The old fashioned way was to use frames, server side includes with Apache (before PHP became popular), or have WYSIWYG tools do it for you.
SSI nowadays requires a host with a specific server stack and configuration. Meanwhile, with purely static files it's easy to find high quality hosts or CDNs, even for free.
For simple sites, it's much easier to pre-generate the static content and then upload the output files (Web 1.0), rather than dynamically generate it for every HTTP request sent to the server (Web 2.0).
It’s always been a pain to do something like maintain consistent navigation across multiple statically rendered pages. Very easy to look back with rose tinted glasses but previous solutions were often worse for the user, e.g. shared navigation created entirely in JS. Hell, I remember sites that used a shared Flash file!
SSI: requires you to have a server to run the include on. Means you can't use something as cheap as an S3 bucket
JS innerHTML: bad for SEO
PHP echo: nothing wrong with it at all, but again, requires you to be running on a server, keep it up to date, etc etc
Why don't people make static sites with a simple "Markdown-or-Similar to HTML" converter, CSS, and vanilla JS...etc?
(This is what I do, btw -- http://zim-wiki.org + a template)