3 ms·
I’d want templating if I’m going to make more than two pages on a site.
by wishinghand 5y ago
I’d want templating if I’m going to make more than two pages on a site.
- danlugo92 5y agoYou can run React (and everything else) off a CDN.
- rmbyrro 5y agoReact runs in the browser. You probably mean serve the files off a CDN
- tentacleuno 5y agoIt 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 https://reactjs.org/docs/react-dom-server.html
- danlugo92 5y agoYeah that's what I meant.
- JonathanBuchh 5y agoStatic site generators like Jekyll and Hugo are perfect for this :)
- onion2k 5y agoHTML has that built in: https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_templates_and_slots https://developer.mozilla.org/en-US/docs/Web/Web_Components/... You'd need some JS to make use of them though.
- wishinghand 5y agoTrue, 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.
- Spivak 5y agoThis 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?