author | Lars Hjemli <hjemli@gmail.com> | 2007-11-11 20:57:21 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-11-11 20:57:21 (UTC) |
commit | d267d88c9cb1fb4a45120b86e410ab604626c6bb (patch) (unidiff) | |
tree | 55ee3a76da83a6272e446f5201928fe1753ea30d /cgitrc | |
parent | 1b7c5b2e0b918e9452694aace7c19194683989a8 (diff) | |
download | cgit-d267d88c9cb1fb4a45120b86e410ab604626c6bb.zip cgit-d267d88c9cb1fb4a45120b86e410ab604626c6bb.tar.gz cgit-d267d88c9cb1fb4a45120b86e410ab604626c6bb.tar.bz2 |
Add support for "robots" meta-tag
With this change, cgit will start to generate the "robots" meta-tag, using
a default value of "index, nofollow".
The default value can be modified with a new cgitrc variable, "robots".
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgitrc | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1,182 +1,187 @@ | |||
1 | ## | 1 | ## |
2 | ## cgitrc: template for /etc/cgitrc | 2 | ## cgitrc: template for /etc/cgitrc |
3 | ## | 3 | ## |
4 | 4 | ||
5 | 5 | ||
6 | ## Uncomment and set to 1 to deactivate caching of generated pages. Mostly | 6 | ## Uncomment and set to 1 to deactivate caching of generated pages. Mostly |
7 | ## usefull for testing. | 7 | ## usefull for testing. |
8 | #nocache=0 | 8 | #nocache=0 |
9 | 9 | ||
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 |
12 | # can be any combination of zip/tar.gz/tar.bz2/tar | 17 | # can be any combination of zip/tar.gz/tar.bz2/tar |
13 | #snapshots=0 | 18 | #snapshots=0 |
14 | 19 | ||
15 | 20 | ||
16 | ## Enable/disable extra links to summary/log/tree per repo on index page | 21 | ## Enable/disable extra links to summary/log/tree per repo on index page |
17 | #enable-index-links=0 | 22 | #enable-index-links=0 |
18 | 23 | ||
19 | 24 | ||
20 | ## Enable/disable display of 'number of files changed' in log view | 25 | ## Enable/disable display of 'number of files changed' in log view |
21 | #enable-log-filecount=0 | 26 | #enable-log-filecount=0 |
22 | 27 | ||
23 | 28 | ||
24 | ## Enable/disable display of 'number of lines changed' in log view | 29 | ## Enable/disable display of 'number of lines changed' in log view |
25 | #enable-log-linecount=0 | 30 | #enable-log-linecount=0 |
26 | 31 | ||
27 | 32 | ||
28 | ## Enable/disable display of HEAD shortlog in summary view. Set it to maximum | 33 | ## Enable/disable display of HEAD shortlog in summary view. Set it to maximum |
29 | ## number of commits that should be displayed | 34 | ## number of commits that should be displayed |
30 | #summary-log=0 | 35 | #summary-log=0 |
31 | 36 | ||
32 | 37 | ||
33 | ## Restrict the number of branches printed in summary view. Set to 0 to | 38 | ## Restrict the number of branches printed in summary view. Set to 0 to |
34 | ## print all branches. | 39 | ## print all branches. |
35 | #summary-branches=0 | 40 | #summary-branches=0 |
36 | 41 | ||
37 | 42 | ||
38 | ## Restrict the number of tags printed in summary view. Set to 0 to | 43 | ## Restrict the number of tags printed in summary view. Set to 0 to |
39 | ## print all tags. | 44 | ## print all tags. |
40 | #summary-tags=0 | 45 | #summary-tags=0 |
41 | 46 | ||
42 | 47 | ||
43 | ## The "Idle" column on the repository index page can read a timestamp | 48 | ## The "Idle" column on the repository index page can read a timestamp |
44 | ## from the specified agefile (if this file cannot be found, the mtime | 49 | ## from the specified agefile (if this file cannot be found, the mtime |
45 | ## of HEAD is used). | 50 | ## of HEAD is used). |
46 | ## The cgit repo on hjemli.net uses the the following command in it's | 51 | ## The cgit repo on hjemli.net uses the the following command in it's |
47 | ## post-receive hook to update the age-file: | 52 | ## post-receive hook to update the age-file: |
48 | ## git-for-each-ref --format="%(committerdate)" --sort=-committerdate \ | 53 | ## git-for-each-ref --format="%(committerdate)" --sort=-committerdate \ |
49 | ## --count=1 > $GIT_DIR/info/web/last-modifie | 54 | ## --count=1 > $GIT_DIR/info/web/last-modifie |
50 | ## | 55 | ## |
51 | #agefile=info/web/last-modified | 56 | #agefile=info/web/last-modified |
52 | 57 | ||
53 | 58 | ||
54 | ## Git detects renames, but with a limit on the number of files to | 59 | ## Git detects renames, but with a limit on the number of files to |
55 | ## consider. This option can be used to specify another limit (or -1 to | 60 | ## consider. This option can be used to specify another limit (or -1 to |
56 | ## use the default limit). | 61 | ## use the default limit). |
57 | ## | 62 | ## |
58 | #renamelimit=-1 | 63 | #renamelimit=-1 |
59 | 64 | ||
60 | 65 | ||
61 | ## Specify a root for virtual urls. This makes cgit generate urls like | 66 | ## Specify a root for virtual urls. This makes cgit generate urls like |
62 | ## | 67 | ## |
63 | ## http://localhost/git/repo/log/?h=branch | 68 | ## http://localhost/git/repo/log/?h=branch |
64 | ## | 69 | ## |
65 | ## instead of | 70 | ## instead of |
66 | ## | 71 | ## |
67 | ## http://localhost/cgit/cgit.cgi?url=repo/log&h=branch | 72 | ## http://localhost/cgit/cgit.cgi?url=repo/log&h=branch |
68 | ## | 73 | ## |
69 | ## For this to work with apache, a rewrite rule must be added to httpd.conf, | 74 | ## For this to work with apache, a rewrite rule must be added to httpd.conf, |
70 | ## possibly looking something like this: | 75 | ## possibly looking something like this: |
71 | ## | 76 | ## |
72 | ## RewriteRule ^/git/(.*)$ /cgit/cgit.cgi?url=$1 [L,QSA] | 77 | ## RewriteRule ^/git/(.*)$ /cgit/cgit.cgi?url=$1 [L,QSA] |
73 | ## | 78 | ## |
74 | ## For this to work with lighttpd, the rewrite rule should look more like this: | 79 | ## For this to work with lighttpd, the rewrite rule should look more like this: |
75 | ## | 80 | ## |
76 | ## url.rewrite = ( | 81 | ## url.rewrite = ( |
77 | ## "^/git/([^?/]+/[^?]*)?(?:\?(.*))?$" => "/cgit.cgi?url=$1&$2" | 82 | ## "^/git/([^?/]+/[^?]*)?(?:\?(.*))?$" => "/cgit.cgi?url=$1&$2" |
78 | ## ) | 83 | ## ) |
79 | ## | 84 | ## |
80 | ## This setting is disabled by default. | 85 | ## This setting is disabled by default. |
81 | #virtual-root=/git | 86 | #virtual-root=/git |
82 | 87 | ||
83 | 88 | ||
84 | ## Set the title printed on the root page | 89 | ## Set the title printed on the root page |
85 | #root-title=Git repository browser | 90 | #root-title=Git repository browser |
86 | 91 | ||
87 | 92 | ||
88 | ## If specified, the file at this path will be included as HTML in the | 93 | ## If specified, the file at this path will be included as HTML in the |
89 | ## sidebar on the repository index page | 94 | ## sidebar on the repository index page |
90 | #index-info= | 95 | #index-info= |
91 | 96 | ||
92 | 97 | ||
93 | ## If specified, the file at this path will be included as HTML above | 98 | ## If specified, the file at this path will be included as HTML above |
94 | ## the repository index | 99 | ## the repository index |
95 | #index-header= | 100 | #index-header= |
96 | 101 | ||
97 | 102 | ||
98 | ## Link to css file | 103 | ## Link to css file |
99 | #css=/cgit/cgit.css | 104 | #css=/cgit/cgit.css |
100 | 105 | ||
101 | 106 | ||
102 | ## Link to logo file | 107 | ## Link to logo file |
103 | #logo=/cgit/git-logo.png | 108 | #logo=/cgit/git-logo.png |
104 | 109 | ||
105 | 110 | ||
106 | ## Url loaded when clicking the logo | 111 | ## Url loaded when clicking the logo |
107 | #logo-link=http://www.kernel.org/pub/software/scm/git/docs/ | 112 | #logo-link=http://www.kernel.org/pub/software/scm/git/docs/ |
108 | 113 | ||
109 | 114 | ||
110 | ## Url loaded when clicking a submodule link | 115 | ## Url loaded when clicking a submodule link |
111 | #module-link=./?repo=%s&page=commit&id=%s | 116 | #module-link=./?repo=%s&page=commit&id=%s |
112 | 117 | ||
113 | 118 | ||
114 | ## Number of chars shown of repo description (in repolist view) | 119 | ## Number of chars shown of repo description (in repolist view) |
115 | #max-repodesc-length=60 | 120 | #max-repodesc-length=60 |
116 | 121 | ||
117 | 122 | ||
118 | ## Number of chars shown of commit subject message (in log view) | 123 | ## Number of chars shown of commit subject message (in log view) |
119 | #max-message-length=60 | 124 | #max-message-length=60 |
120 | 125 | ||
121 | 126 | ||
122 | ## Number of commits per page in log view | 127 | ## Number of commits per page in log view |
123 | #max-commit-count=50 | 128 | #max-commit-count=50 |
124 | 129 | ||
125 | 130 | ||
126 | ## Root of cached output | 131 | ## Root of cached output |
127 | #cache-root=/var/cache/cgit | 132 | #cache-root=/var/cache/cgit |
128 | 133 | ||
129 | 134 | ||
130 | ## Include another config-file | 135 | ## Include another config-file |
131 | #include=/var/cgit/repolist | 136 | #include=/var/cgit/repolist |
132 | 137 | ||
133 | ## | 138 | ## |
134 | ## Time-To-Live settings: specifies how long (in minutes) different pages | 139 | ## Time-To-Live settings: specifies how long (in minutes) different pages |
135 | ## should be cached (0 for instant expiration, -1 for immortal pages) | 140 | ## should be cached (0 for instant expiration, -1 for immortal pages) |
136 | ## | 141 | ## |
137 | 142 | ||
138 | ## ttl for root page | 143 | ## ttl for root page |
139 | #cache-root-ttl=5 | 144 | #cache-root-ttl=5 |
140 | 145 | ||
141 | ## ttl for repo summary page | 146 | ## ttl for repo summary page |
142 | #cache-repo-ttl=5 | 147 | #cache-repo-ttl=5 |
143 | 148 | ||
144 | ## ttl for other dynamic pages | 149 | ## ttl for other dynamic pages |
145 | #cache-dynamic-ttl=5 | 150 | #cache-dynamic-ttl=5 |
146 | 151 | ||
147 | ## ttl for static pages (addressed by SHA-1) | 152 | ## ttl for static pages (addressed by SHA-1) |
148 | #cache-static-ttl=-1 | 153 | #cache-static-ttl=-1 |
149 | 154 | ||
150 | 155 | ||
151 | 156 | ||
152 | ## Example repository entry. Required values are repo.url and repo.path (each | 157 | ## Example repository entry. Required values are repo.url and repo.path (each |
153 | ## repository section must start with repo.url). | 158 | ## repository section must start with repo.url). |
154 | #repo.url=cgit | 159 | #repo.url=cgit |
155 | #repo.name=cgit | 160 | #repo.name=cgit |
156 | #repo.desc=the caching cgi for git | 161 | #repo.desc=the caching cgi for git |
157 | #repo.path=/pub/git/cgit ## this is the path to $GIT_DIR | 162 | #repo.path=/pub/git/cgit ## this is the path to $GIT_DIR |
158 | #repo.owner=Lars Hjemli | 163 | #repo.owner=Lars Hjemli |
159 | #repo.defbranch=master ## define a default branch | 164 | #repo.defbranch=master ## define a default branch |
160 | #repo.snapshots=tar.bz2 ## override a sitewide snapshot-setting | 165 | #repo.snapshots=tar.bz2 ## override a sitewide snapshot-setting |
161 | #repo.enable-log-filecount=0 ## override the default filecount setting | 166 | #repo.enable-log-filecount=0 ## override the default filecount setting |
162 | #repo.enable-log-linecount=0 ## override the default linecount setting | 167 | #repo.enable-log-linecount=0 ## override the default linecount setting |
163 | #repo.module-link=/git/%s/commit/?id=%s ## override the standard module-link | 168 | #repo.module-link=/git/%s/commit/?id=%s ## override the standard module-link |
164 | #repo.readme=info/web/readme ## specify a file to include on summary page | 169 | #repo.readme=info/web/readme ## specify a file to include on summary page |
165 | 170 | ||
166 | ## Additional repositories grouped under "mirrors" | 171 | ## Additional repositories grouped under "mirrors" |
167 | #repo.group=mirrors | 172 | #repo.group=mirrors |
168 | 173 | ||
169 | #repo.url=git | 174 | #repo.url=git |
170 | #repo.path=/pub/git/git | 175 | #repo.path=/pub/git/git |
171 | # | 176 | # |
172 | #repo.url=linux | 177 | #repo.url=linux |
173 | #repo.path=/pub/git/linux | 178 | #repo.path=/pub/git/linux |
174 | 179 | ||
175 | ## A group of private repositories (with a working directory) | 180 | ## A group of private repositories (with a working directory) |
176 | #repo.group=private | 181 | #repo.group=private |
177 | 182 | ||
178 | #repo.url=larsh/cgit | 183 | #repo.url=larsh/cgit |
179 | #repo.path=/home/larsh/src/cgit/.git | 184 | #repo.path=/home/larsh/src/cgit/.git |
180 | 185 | ||
181 | #repo.url=larsh/git | 186 | #repo.url=larsh/git |
182 | #repo.path=/home/larsh/src/git/.git | 187 | #repo.path=/home/larsh/src/git/.git |