-rw-r--r-- | cgit.h | 1 | ||||
-rw-r--r-- | cgitrc | 5 | ||||
-rw-r--r-- | shared.c | 3 | ||||
-rw-r--r-- | ui-shared.c | 2 |
4 files changed, 11 insertions, 0 deletions
@@ -141,2 +141,3 @@ extern char *cgit_cache_root; | |||
141 | extern char *cgit_repo_group; | 141 | extern char *cgit_repo_group; |
142 | extern char *cgit_robots; | ||
142 | 143 | ||
@@ -10,2 +10,7 @@ | |||
10 | 10 | ||
11 | ## This variable can be used to override the default value for "robots" | ||
12 | ## meta-tag. If unset, the meta-tag isn't generated. | ||
13 | #robots=index, nofollow | ||
14 | |||
15 | |||
11 | ## Set allowed snapshot types by default. Can be overridden per repo | 16 | ## Set allowed snapshot types by default. Can be overridden per repo |
@@ -28,2 +28,3 @@ char *cgit_cache_root = CGIT_CACHE_ROOT; | |||
28 | char *cgit_repo_group = NULL; | 28 | char *cgit_repo_group = NULL; |
29 | char *cgit_robots = "index, nofollow"; | ||
29 | 30 | ||
@@ -199,2 +200,4 @@ void cgit_global_config_cb(const char *name, const char *value) | |||
199 | cgit_renamelimit = atoi(value); | 200 | cgit_renamelimit = atoi(value); |
201 | else if (!strcmp(name, "robots")) | ||
202 | cgit_robots = xstrdup(value); | ||
200 | else if (!strcmp(name, "repo.group")) | 203 | else if (!strcmp(name, "repo.group")) |
diff --git a/ui-shared.c b/ui-shared.c index 5192800..2f771da 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -366,2 +366,4 @@ void cgit_print_docstart(char *title, struct cacheitem *item) | |||
366 | htmlf("<meta name='generator' content='cgit %s'/>\n", cgit_version); | 366 | htmlf("<meta name='generator' content='cgit %s'/>\n", cgit_version); |
367 | if (cgit_robots && *cgit_robots) | ||
368 | htmlf("<meta name='robots' content='%s'/>\n", cgit_robots); | ||
367 | html("<link rel='stylesheet' type='text/css' href='"); | 369 | html("<link rel='stylesheet' type='text/css' href='"); |