News for hackers. Stuff that matters.
Re:Writing HTML in HTML (2019) by tannhaeuser on Wednesday April 07, 2021 @11:35AM (#26726411)
The HTML vocabulary doesn't have and doesn't need these because SGML, on which HTML is based, has entities and many other constructs for templating. In fact, both SSI in default config and embedded PHP use a (simplistic) form of SGML extension syntax (markup comments and processing instructions, resp.) for equipping static HTML with dynamic features, though SGML has much more powerful ones.
Re:Writing HTML in HTML (2019) by blacktriangle on Wednesday April 07, 2021 @11:56AM (#26726756)
So are you suggesting the solution is we should write SGML and then have that converted to HTML to fill the role of a static site generator?
Re:Writing HTML in HTML (2019) by tannhaeuser on Wednesday April 07, 2021 @12:12PM (#26726994)
I was merely commenting on why HTML itself doesn't have the features you mentioned. But yeah, authoring HTML in SGML is the most natural thing given HTML's origins. It doesn't have to run as a static site generator since SGML can run right in the browser and in the web server backend (see eg my project here [1]). Though using SGML as static site generator from the command line or Makefiles is also extremely useful, and maybe the most appealing for developers or when static site hosting is desired ([2]).

[1]: http://sgmljs.net

[2]: http://sgmljs.net/docs/producing-html-tutorial/producing-htm...

Re:Writing HTML in HTML (2019) by blacktriangle on Wednesday April 07, 2021 @12:30PM (#26727231)
This is a whole avenue of exploration I had never even considered, thank you very much for responding with this.