Return to homepageBack to blog
23 June 2021 - Some notes on how I run this site
I recently did a lot of maintanence to the site, in order to make it easier to maintain. It had been quite a nightmare, because I'd just been copying and pasting a template HTML file to create pages, and anytime I wanted to change something on every page, like the copyright footer, I would have to do it manually for each page, or use sed (but I'm not very good with it and have messed pages up with it in the past. But that's my own issue).
The new way I do it is much better and makes much more sense. I created separate PHP files for the header, menu, and footer, wich use a PHP variable for the current page title. When I make a new page, I simply set the title
variable to whatever I want it to be, then use the PHP
include() command to include the header, menu, and footer files. This way the only part of the page I need to write is the content.
Not only does this make creating pages easier, but if I decide to change the layout of the menu, or how I format the title bar, I only have to edit one file and it will apply the change to every page on this site.