News for hackers. Stuff that matters.
Re:Entire website in a single HTML file by wishinghand on Thursday December 23, 2021 @11:05PM (#29670052)
I’d want templating if I’m going to make more than two pages on a site.
Re:Entire website in a single HTML file by onion2k on Friday December 24, 2021 @02:27AM (#29671235)
HTML has that built in: https://developer.mozilla.org/en-US/docs/Web/Web_Components/...

You'd need some JS to make use of them though.

Re:Entire website in a single HTML file by Spivak on Sunday December 26, 2021 @05:36PM (#29697027)
This honestly looks like a huge PITA compared to even the worst static site generator’s syntax. Is this actually supposed to be used as end-developer templates?
Re:Entire website in a single HTML file by wishinghand on Friday December 24, 2021 @06:16PM (#29678718)
True, but keeping to the spirit of the comment I replied to, I’d prefer it to be HTML only. Something like <template src=“header.html”> and it just uses a relative or absolute path.
Re:Entire website in a single HTML file by JonathanBuchh on Friday December 24, 2021 @01:42AM (#29670998)
Static site generators like Jekyll and Hugo are perfect for this :)
Re:Entire website in a single HTML file by danlugo92 on Thursday December 23, 2021 @11:40PM (#29670282)
You can run React (and everything else) off a CDN.
Re:Entire website in a single HTML file by rmbyrro on Friday December 24, 2021 @04:33PM (#29677948)
React runs in the browser. You probably mean serve the files off a CDN
Re:Entire website in a single HTML file by danlugo92 on Wednesday January 05, 2022 @01:06PM (#29812627)
Yeah that's what I meant.
Re:Entire website in a single HTML file by tentacleuno on Saturday December 25, 2021 @06:26PM (#29688036)
It can also run in the server with Server Side Rendering[0]. I believe some CDN's also offer support for this, too.

[0]: https://reactjs.org/docs/react-dom-server.html