changelog shortlog tags branches changeset files revisions annotate raw help

Mercurial > hg > werc / sites/werc.cat-v.org/docs/config-options.md

changeset 651: fce7c8747d57
parent: dd58ad29ffbf
author: Uriel <u@berlinblue.org>
date: Tue, 28 Jun 2011 01:50:24 +0000
permissions: -rw-r--r--
description: Documentation updates:
- Try to explain better that werc expects Plan 9 tools in /usr/local/plan9/bin/
- Note possible bug.
- Other small doc changes.
1 Werc Configuration Options
2 ==========================
3 
4 You can also find a description of some basic config options in the `etc/initrc` file itself.
5 
6 General Setup Options
7 --------------------
8 
9 * `formatter` - Command to use for document formatting (usually some form of markdown), should be able to take input both from file names passed as arguments or from stdin if no file names are provided. By default: `formatter=(fltr_cache markdown.pl)`
10 
11 
12 Titles and Metadata
13 -------------------
14 
15 Variables:
16 
17 * Page title:
18  * siteTitle
19  * siteSubTitle
20 
21 * Html header meta tags:
22  * meta_description - `<meta name="description" ...`
23  * meta_keywords - `<meta name="keywords" ...`
24  * extraHeaders - Raw extra html headers, the content of this var will be inserted inside the `<head>` tag..
25 
26 
27 Sidebar and Navigation
28 ----------------------
29 
30 Variables:
31 
32 * sideBarNavTitle
33 
34 Functions:
35 
36 * `conf_hide_paths [path_patterns ...]` - Hide the given patterns from navigation menu, sitemap and dir listing (do *not* depend on this for security!).
37 
38 HTTP Control
39 ------------
40 
41 Variables:
42 
43 * extraHttpHeaders - Raw HTTP headers to be added to response.
44 
45 Functions:
46 
47 * `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/.
48 
49 
50 Access Control and Permissions
51 ------------------------------
52 
53 The permissions system is very flexible, for example to only allow access to members of the group 'editors' you can do something like:
54 
55  switch ($req_path) {
56  case /_users/login
57  case /pub/*
58  case /robots.txt
59  case *
60  if(! check_user editors)
61  perm_redirect /_users/login
62  }
63 
64 
65 To automatically redirect users without permission to the login page if they are not members of the group 'editors'.
66 
67 See also [the documentation on user and group management](user_management).
68