News for hackers. Stuff that matters.
Re:A static website with React by vmarsy on Friday February 17, 2017 @11:37AM (#13669522)
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.

Re:A static website with React by romaniv on Friday February 17, 2017 @11:50AM (#13669641)
> 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.

Re:A static website with React by tokenizerrr on Friday February 17, 2017 @11:53AM (#13669687)
Except that iframes introduce additional http requests, difficulties with selecting text and all the other annoyances that come with them.
Re:A static website with React by tonyedgecombe on Friday February 17, 2017 @02:08PM (#13670821)
I'm surprised html doesn't have an include tag.
Re:A static website with React by amk_ on Friday February 17, 2017 @02:28PM (#13670963)
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.
Re:A static website with React by mikewhy on Friday February 17, 2017 @02:56PM (#13671178)
Whoa. Flashbacks to SHTML.
Re:A static website with React by gambler on Friday February 17, 2017 @07:06PM (#13672816)
I'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.)