By Jack McDade
Chronicle is a simple, chronilogically organized, file-based publishing engine. It takes a content directory (which can contain literally anything you want, as long as you have an index.php file), adds a little yaml magic for meta data, and powers all the navigation between entries. Inspired in part by my buddy Travis Schmeisser.
- Drop Chronicle on your server (local or otherwise)
- Customize the main
config.yamlfile to set your global site information - rename the
htaccessfile to.htaccess(support for no mod_rewrite access is on the roadmap) - Start publishing!
- Chronicle looks for date-based directories inside the
/contentdirectory and will automatically redirect the user to the newest "entry" upon visiting the root url ("/"). - Your entries have
$prevand$nextpath variables available to use in your index.php file. For example, add previous and next entry navigation. Look in the/contentdirectory for examples - If you add a
meta.yamlfile to any given content subdirectory, any of the YAML key:value pairs will be availble to use in both the index.php view and archive listing page. - Your archive page will pull all the meta data from all of your content directories to help you build a list. Look at
content/archive/index.phpfor some examples.
asset_path(): pass in the relative path to any asset (e.g. CSS, JS, image) and it returns the correct full server path. Seecontent/20120330/index.phpfor an example.