I have a simple GitHub webpage - the main page and then 2 or 3 'subpages' which you can click to access (think of an about page, a contact page, and a CV page). Within each of these pages is a header with links to the other pages. Right now, this header is 'hard-coded' into each page so that if I edit the header of the main page, the header for the other pages will remain unchanged.

Is there a way to change this so that I have some file (maybe header.txt or header.html?) which I change which then changes the header for all the other pages? One issue I run into is that pages are in their own folders, so the path to the CSS file or to link to other pages changes depending on the page.

  • 1
    There are literally hundreds of ways to do this. Server side scripting, client side scripting, or site generators can all do it and there are many in each of those categories. This is too big of a topic to cover in a few paragraphs of an answer here. Nov 20 at 23:54
  • 1
    Take a look and see if your webserver supports server side includes.
    – Trebor
    Nov 21 at 0:03
  • @StephenOstermiller I don't doubt that that's true, but I am new to webmastery and comments like yours do little to help someone start on a path to a solution.
    – TSF
    Nov 21 at 20:40

Browse other questions tagged or ask your own question.