in reply to Server Side Includes

I have to maintain a web site that uses server-side includes for content management that sounds similar to what you want to do. It has .shtml files for the main pages, .txt files for the content included in each page, and has include files for headers and sidebars. It is a pain to manage because it requires multiple files for each content page. It has the management headaches of a more complicated static web site, and the performance of a dynamic web site.

I would invert the problem and generate the html files from the content. The html files become the on-disk cache. Add the standard elements with a template system. With a small website, storing the content on disk would work fine. For a large web site, storing it in a database makes more sense. The CGI script would generate the HTML files.

I think there hasn't been enough exploration of dynamically managed but statically served web sites. Many web sites don't update the content frequently enough to require every page to be dynamically generated. However, a web interface to modify content and add the standard elements is very useful.