Havardgram
Editions: Normal | Mobile
Jakjak that catcat says the photo galleries are mostly just cat photos. She is a fluff butt.

 2:12PM  up 3 days, 23:57, 2 users, load averages: 0.08, 0.08, 0.08

911M	/www/sevensages/

Tue Apr 23 14:12:23 CDT 2024


How it all works...

The lib/ directory is where all the Template Toolkit blocks are kept. The lib/tpl/ directory contains the primary template blocks that are the responsibility of the person that maintains the overall design and style of the site. The lib/inc/ directory contains non-style reusable page elements that are to be updated under the direction of that section's editor. There are some well-known files here, in particular, the featured item and various promoted items. The lib/perl/ directory contains reusable components that make use of perl code. These are mostly used to generate story lists, including the item list for the RSS feed. The perl scripts source their data from the catalogs which are kept under var/ and can provide links to both internal and external resources. There is another selection of files under common/ which are able to be included. I use this to provide the top-most bar on this site.

The site-proper lives under src/. These are pages and related content that are transformed by the ttree command and then copied over to the active site. There is a specific naming scheme in play here. Sections/categories will always start with an uppercase letter. Subsections should capitalize the first letter but may have lower case letters. Articles are ordered by date, so the first path element is always the year, followed by the section name(s), month, day, a slug, and then the files for that page. Non-sectioned content, otherwise known as regular pages use lower-cased names as at least their first path element.

The reason everything is separated like this is that it allows us to implement permissions in the version control system to tightly control which users are able to modify certain parts of the site. It also also makes it easy to create a perforce workspace that is narrowly-scoped to what is needed at any particular time. As it stands, I should rarely need to modify anything other than files in the current year's directory under src/ and the catalog files.

Static media lives under the media/ directory, but are generally mapped in using an Alias directive in the Apache config. This isn't all that exciting. Common media used by anything included from the common/ directory are available under the netimg/ directory.

As for building the site, I run the tpage command as follows:

/usr/local/bin/ttree\
        --eval_perl \
        -s /www/sevensages/src \
        -d /www/sevensages/web \
        -l /www/sevensages/lib/tpl \
        -l /www/sevensages/lib/inc \
        -l /www/sevensages/lib/perl  \
        -l /www/common/lib/tpl

Main About Us Contact Stories Newsletter Gimme Site Statistics Home