swerc

anselm's simpler werc fork
git clone git://git.suckless.org/swerc
Log | Files | Refs | README

commit bb9b4822266fffa12216b43d188bde9352ddc506
parent 5074175445e13b2ecb860f4049bd3eb4e33285db
Author: uriel@soma <unknown>
Date:   Mon, 23 Feb 2009 08:17:42 +0000

Document updates.
Diffstat:
Msites/werc.cat-v.org/docs/config_options.md | 10+++++++++-
Asites/werc.cat-v.org/docs/site_customization.md | 50++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/sites/werc.cat-v.org/docs/config_options.md b/sites/werc.cat-v.org/docs/config_options.md @@ -26,7 +26,7 @@ Variables: Functions: -* `conf_hide_paths [path_patterns ...]` - Hide the given patterns from navigation menu, sitemap and dir listing (do *not* depend on this for securty!). +* `conf_hide_paths [path_patterns ...]` - Hide the given patterns from navigation menu, sitemap and dir listing (do *not* depend on this for security!). Http control ------------ @@ -40,4 +40,12 @@ Functions: * `conf_perm_redirect [pattern] destination` - If pattern is provided, match it against the requested url, and replace the match with `destination`; ie., *s/pattern/destination/. +Access Control and Permissions +------------------------------ +The permissions system is very flexible, for example to only allow access to members of the group 'editors' you can do something like: + + if(! check_user editors) + perm_redirect /_users/login + +See also [the documentation on user and group management](user_management). diff --git a/sites/werc.cat-v.org/docs/site_customization.md b/sites/werc.cat-v.org/docs/site_customization.md @@ -0,0 +1,50 @@ +Site Customization +================== + +To change any of the default templates and include files simply copy them +from /lib/ to your site's _werc/lib/ and edit at will. + +File Types +---------- + +* '.tpl' files are rc [template files](rc_template_lang). +* '.inc' are text files that are inserted 'as is' without any extra processing. + +Site Groups +----------- + +Site configuration and customization and be 'grouped' to allow a shared set of templates among a specific group of sites (useful for sets of sub-domains for example). + +Simply set 'masterSite' configuration variable to the name of the site you want to 'inherit' templates, style and configuration from. + +For example, if we have two sites bar.com and foo.bar.com, and in sites/foo.bar.com/_werc/conf we add: + + masterSite=bar.com + +When a template (eg., 404.tpl) is requested it will be looked up first in /sites/foo.bar.com/_werc/lib/404.tpl, if that fails then in /sites/bar.com/_werc/lib/, and if that is missing too, the default /lib/404.tpl is used. + +The same applies to .inc files. + + +List of Template and Included Files +----------------------------------- + +Here is a list of the most commonly used templates and include files with their corresponding descriptions. + +Include: + +* top_bar.inc: The thin header at the top of every page, usually contains static links to other related sites or anything else you like. +* footer.inc: Similar but at the bottom of every page, by default includes a link to the user login page. +* headers.inc: Raw html headers to be included inside <head> tag. + +Templates: + +* default_master.tpl: This is the main template, which calls all the sidebar and other handlers and applications, usually you won't need to edit it unless you want to make changes to the layout or similar dramatic changes. +* sitemap.tpl: Template for the sitemap page. +* 404.tpl: Template for 'File Not Found' pages. + + +See also +-------- + +* [CSS style sheets customization](css_style).