Published 2010-05-24
Managing Web Pages
Most web Content Management Systems (CMS) build web pages each time they are requested. This blog, for example, is managed by Wordpress in that manner.
Since most page content is not so dynamic as to change between visits this seems inefficient. Sites written in static HTML (e.g. Hyde) generally use much less server resource.
I have written a Django-based Content Manager for this site which writes out the HTML when I have finished editing a web page.
The main body of each page is stored in a database as Markdown text for easy editing.
At present, are only two data structures in the Content Manager:
- Pages -- Which merely consist of free-format Markdown and HTML.
- Lists -- Which are generated using a list item template and set of data lines (see Cardgen for an example) and then used as the main part of a page.
Each page on this site, apart from in this blog, now has a footer which shows when the content was last changed and a link to the Markdown source.
This is just a proof-of-concept for now. Still to come:
- Blog application.
- Data structure similar to above Lists but which generate multiple similar web pages.
If this works out then I shall make the source code available.