Building Psyke.org

When I first started Psyke.org, the site was built and updated by hand using nothing but a text editor. As the site grew this became quite cumbersome --- even small design changes or content updates would take too long to be practical.

I considered using a CMS to edit the site, but decided against it for two reasons:

  1. None of the systems available at the time had the features I was looking for.
  2. Hosting would be cheaper if the site could run without access to server-side scripting.

This led to the development of my templating system, Yggdrasil. This tool made it easy for me to apply design changes across the site and to add or edit content.

In the following, I will try to describe how the site is built and published.

Source Tree

All the files that make up the site are placed in a directory tree with the same structure as the published site. The two basic file types in the source tree are .html and .tmpl.

The .html files only contain tags that can occur between <body> and </body> (view source of this page). I generally only keep one HTML file (index.html) in each directory of the source. I do this to get nice, clean URLs (e.g. http://www.psyke.org/about/how/ and to make an eventual migration to a full CMS a lot easier.

The .tmpl files contain a combination of HTML tags and Perl code snippets. This HTML content of the template files is wrapped around the content of a .html file. This page is built by wrapping the following templates around the .html file mentioned above:

The comments found in the templates are used to exclude some of the content form being indexed by the local search engine.

Adding Content

After adding or editing content, the following steps are performed: