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.
[ Parent
| on HN ]
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.
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.
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.