title: What's *the* modern way not to duplicate code on HTML pages and subpages?
body: <p>So I'm making a HTML(5) page that will link to a couple of subpages.</p>
  
  <p>I have a navigation menu and a footer that are quite elaborate CSS and HTML -wise. Copypasting  this code for every subpage is an option but I suspect there's a better way.</p>
  
  <p>Back in the day it was most often accomplished using frames, but they are now quite <em>passe</em>.</p>
  
  <p>I didn't find a 'default' go-to solution anywhere... The suggestions are:</p>
  
  <p>Use Javascript to <em>document.write</em> the code on subpages. <strong>OR</strong>
  Use PHP to generate the site so that navigation and footer are included from a separate file <strong>OR</strong>
  Use Ruby on Rails (would have to grasp it to a decent extent... and I'm not sure if this is even the sort of thing it's used for)</p>
  
  <p>What's the best way? Isn't PHP an overkill for a fairly simple site? (yeah it has navigation etc. but otherwise it's pretty simple). Any other suggestions?</p>