Documentation
Not much documentation so far. For global configuration copy etc/initrc to etc/initrc.local and customize it as you like.
For how to setup your web server see httpd_configiguration.
For a basic setup all you need is to create a new directory under sites/ called the same as the domain to be served, and then create a _werc/ directory inside it, and _werc/config file.
Sample _werc/config file:
siteTitle='My Blagh'
siteSubTitle='egotism squared'
If you want to change the layout of your site you can edit werc/lib/defaultmaster.tpl, you will need to provide a template for the 'body' of the generated html, .tpl files use a rc templating system implemented in awk, but all you need to know is that lines starting with % are executed in rc, and you can call the following predefined rc commands: gentitle, gensidebar and genbody.
Here is a minimalistic default_master.tpl
<div class="title">
% gentitle
</div>
<div id="side-bar">
% gensidebar
</div>
<div id="main-body">
% genbody
</div>
You can customize other components by copying them from the global lib/ directory into site-specific _werc/lib/ and then editing them as you like.
If you want to have a group of sites that could share some templates or other code you can use the masterSite config variable.
The lookup for templates and include files follows this order:
- werc/sites/{MYSITE}/werc/lib/{FILE}
- werc/sites/$masterSite/_werc/lib/{FILE}
- werc/lib/{FILE}
Config files are looked up in a similar order except in _werc/config and etc/config.
Blogs
Any directory named 'blog' or 'Blog' will automatically become a blog. Blog posts are files (in the future also directories?) of the form: YYYY-MM-DD-N_Post_title.md where YYYY-MM-DD is the current date, and N is increased for every post for that day.
Optionally one can set the blogDirs variable in _config to a list of the directories which one wants to aggregate into this directory. For example one can:
blogDirs = ( /www/siteNews /home/*/blog )
To produce a blog that collects posts in /www/siteNews and under each user ~/blog dir.
An rss link is automatically generated for blog.