With each new page I have to update the navigation panel. Which means I go from page to page copying and pasting my navigation bar. The more pages I add the harder it gets.
I'd strongly recommend using PHP:
However, if that is not an option, you can use Server Side Includes:
File in the same dir:
File in a different dir:
You'll need a Linux/Apache (not Windows) server for this to work. You'll also need to use the .shtml
file extension.
Alternatively, given that you want to keep .html
extensions, you can make Apache "think" that all .html
files are actually .php
:
Create a .htaccess file at the root of your website and add this line:
AddType application/x-httpd-php .html .htm
If your are running PHP as CGI (probably not the case), you should write instead:
AddHandler application/x-httpd-php .html .htm
(Taken from this answer)