author | Lars Hjemli <hjemli@gmail.com> | 2008-04-28 23:06:30 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-04-28 23:06:30 (UTC) |
commit | c6431a71508f1b61a95b01d85fe4534a0245e626 (patch) (unidiff) | |
tree | 8a6200d51cd5d00f63b45a9a91c2e1cefa3c5740 /cgit.c | |
parent | 651ef79768dde30aabc61189974c9047ee43752f (diff) | |
download | cgit-c6431a71508f1b61a95b01d85fe4534a0245e626.zip cgit-c6431a71508f1b61a95b01d85fe4534a0245e626.tar.gz cgit-c6431a71508f1b61a95b01d85fe4534a0245e626.tar.bz2 |
Prepare for 'about site' page / add 'root-readme' option to cgitrc
The new option names a file which will be included on a new page, next
to the current 'index' page.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -8,32 +8,34 @@ | |||
8 | 8 | ||
9 | #include "cgit.h" | 9 | #include "cgit.h" |
10 | #include "cache.h" | 10 | #include "cache.h" |
11 | #include "cmd.h" | 11 | #include "cmd.h" |
12 | #include "configfile.h" | 12 | #include "configfile.h" |
13 | #include "html.h" | 13 | #include "html.h" |
14 | #include "ui-shared.h" | 14 | #include "ui-shared.h" |
15 | 15 | ||
16 | const char *cgit_version = CGIT_VERSION; | 16 | const char *cgit_version = CGIT_VERSION; |
17 | 17 | ||
18 | void config_cb(const char *name, const char *value) | 18 | void config_cb(const char *name, const char *value) |
19 | { | 19 | { |
20 | if (!strcmp(name, "root-title")) | 20 | if (!strcmp(name, "root-title")) |
21 | ctx.cfg.root_title = xstrdup(value); | 21 | ctx.cfg.root_title = xstrdup(value); |
22 | else if (!strcmp(name, "root-desc")) | 22 | else if (!strcmp(name, "root-desc")) |
23 | ctx.cfg.root_desc = xstrdup(value); | 23 | ctx.cfg.root_desc = xstrdup(value); |
24 | else if (!strcmp(name, "root-readme")) | ||
25 | ctx.cfg.root_readme = xstrdup(value); | ||
24 | else if (!strcmp(name, "css")) | 26 | else if (!strcmp(name, "css")) |
25 | ctx.cfg.css = xstrdup(value); | 27 | ctx.cfg.css = xstrdup(value); |
26 | else if (!strcmp(name, "logo")) | 28 | else if (!strcmp(name, "logo")) |
27 | ctx.cfg.logo = xstrdup(value); | 29 | ctx.cfg.logo = xstrdup(value); |
28 | else if (!strcmp(name, "index-header")) | 30 | else if (!strcmp(name, "index-header")) |
29 | ctx.cfg.index_header = xstrdup(value); | 31 | ctx.cfg.index_header = xstrdup(value); |
30 | else if (!strcmp(name, "index-info")) | 32 | else if (!strcmp(name, "index-info")) |
31 | ctx.cfg.index_info = xstrdup(value); | 33 | ctx.cfg.index_info = xstrdup(value); |
32 | else if (!strcmp(name, "logo-link")) | 34 | else if (!strcmp(name, "logo-link")) |
33 | ctx.cfg.logo_link = xstrdup(value); | 35 | ctx.cfg.logo_link = xstrdup(value); |
34 | else if (!strcmp(name, "module-link")) | 36 | else if (!strcmp(name, "module-link")) |
35 | ctx.cfg.module_link = xstrdup(value); | 37 | ctx.cfg.module_link = xstrdup(value); |
36 | else if (!strcmp(name, "virtual-root")) { | 38 | else if (!strcmp(name, "virtual-root")) { |
37 | ctx.cfg.virtual_root = trim_end(value, '/'); | 39 | ctx.cfg.virtual_root = trim_end(value, '/'); |
38 | if (!ctx.cfg.virtual_root && (!strcmp(value, "/"))) | 40 | if (!ctx.cfg.virtual_root && (!strcmp(value, "/"))) |
39 | ctx.cfg.virtual_root = ""; | 41 | ctx.cfg.virtual_root = ""; |