Static cms?

I am building an HTML Website and don’t want to use WordPress or a CMS like Joomla. However as the website will have a considerable amount of pages, something that will get very exhausting is making sure the header and footer is constantly up to date on all the pages. Is there a way to externally call the header and footer sections on an HTML page and have the header and footer on an external page?

Something like an iFrame but an iFrame itself worn work. It is important that it is also SEO Friendly.

Thanks!

You can use server languages. For example, PHP includes.

You’d place the header or footer section in a file (probably callled header.php) and place this line of code at the top of each file

<?php include "header.php" ?>

Now whatever is in the header.php file willl update on all pages when you update it. Not pure HTML but still.

2 Likes

There are also alternatives like Jekyll. That live on your computer/a repository and generate static HTML pages. :smile:

1 Like

Yes, a lot of options here. The simplest is to do what @RyanReese mentioned, using PHP includes. (I put together an explanation of what they are and how to use them a while back that might be helpful.)

The next step up would be to create a single page template that you call into all your pages. Here’s a nice example of that: PHP include menu & class active CSS - #7 by system I’ve been using this method lately and love it.

Then you get into CMS territory. There are some really nice “flat file” CMSes around these days, like Statamic (not free) and Kirby (free) that do what you are looking for without needing a database. Slightly more geeky is the Jekyll option that @bpartch mentioned.

Ultimately, 'sup to you what you decide to do. :slight_smile:

Jekyll is geeky? LOL :stuck_out_tongue:

There is also Ghost and Pelican, the latter which I ultimately choose recently. Some other topics that may be of interest to you here are

http://www.sitepoint.com/community/t/kvm-versus-openvz-does-it-matter/99225/4?u=cpradio

Hi…You can try frameset but it is deprecated. Adobe Dreamweaver is a the best IDE for static sites…and they have system for managing templates and snippets…

Yea, what @RyanReese and @ralphm said is definitely the “easiest”, but not necessarily the most scalable (I would still look into it to learn how flat file CMS’ work). In my opinion, you should go with a simple flat file CMS that has:

  1. A dashboard - This way you’re not tied to having to log into FTP just to make a typo change. By extension, it should also have an easy to use editor.
  2. User Role Manager - Jjjjust in case you ever need to add more users (friends/coworkers/public) that can add pages without logging into your account.
  3. (optional) Templating Engine - So you don’t have to fuss with a server language if you don’t already know one.

This guy has a comparison of some of the Flat File CMS’ I’ve used. All are great, but I would personally go with Kirby as it’s the easiest to get into, has the biggest library of plugins and premade themes.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.