4 ms·
I think the whole benefit of a static website generator in general is to avoid the "I copy/paste the same header/footer on each" step, especially copy-pasting t
by vmarsy 10y ago
I think the whole benefit of a static website generator in general is to avoid the "I copy/paste the same header/footer on each" step, especially copy-pasting the menu/header, as your menu can change as you add new pages / blog posts.
I can see good benefits of having a way to do static site generation with the React ecosystem if you're already familiar with it.
- romaniv 10y ago> I think the whole benefit of a static website generator in general is to avoid the "I copy/paste the same header/footer on each" step, especially copy-pasting the menu/header, as your menu can change as you add new pages / blog posts. If the website is simple, you could use iframes for headers and footers.
- tokenizerrr 10y agoExcept that iframes introduce additional http requests, difficulties with selecting text and all the other annoyances that come with them.
- tonyedgecombe 10y agoI'm surprised html doesn't have an include tag.
- amk_ 10y agohttps://en.wikipedia.org/wiki/Server_Side_Includes https://en.wikipedia.org/wiki/Server_Side_Includes <!--#include virtual="../snippet.html" --> Most servers that you would get for a shared host (ie Apache, NGINX) support this.
- mikewhy 10y agoWhoa. Flashbacks to SHTML.
- gambler 10y agoI'm annoyed but not surprised. This is how a lot of HTML was developed. First, you have a need. Then you get a crippled native "solution", that emerges from some committee and therefore doesn't really solve anything. In lieu of alternatives, a lot of people use it anyway. Then the problem is ignored long enough so other people come up with hacks to solve the same problem slightly less bad. Then the problem is ignored semi-permanently because 'hey, you can just use one of those hacks!'. (Look up iframe seamless attribute.)