Ajout tag Bénévolat/Prévision
[cyclowiki.git] / ikiwiki.setup
1 #!/usr/bin/perl
2 use vars qw/%setup_args/;
3
4 BEGIN {
5 use File::Basename;
6 use File::Spec::Functions;
7 my $srcdir = dirname($IkiWiki::config{'setupfile'});
8 my ($wiki, $wikiname, $destdir, $global_sidebars, $search_db, $userdir);
9 if (-x "$srcdir/Public") {
10 $wiki = '3615';
11 $wikiname = '3615';
12 $destdir = $srcdir.'-www';
13 $global_sidebars =
14 [
15 ];
16 $search_db = # db, auth required, page having the search, pages indexed
17 [ '3615', 1
18 , '*'
19 , '*
20 and !recentchanges/*
21 and !templates
22 and !templates/*
23 and !Public/recentchanges/*
24 and !Public/templates
25 and !Public/templates/*'
26 ];
27 $userdir = '/Public/Camarade';
28 }
29 else {
30 $wiki = 'wiki';
31 $wikiname = 'CycloWiki';
32 $destdir = $srcdir.'-www';
33 $global_sidebars =
34 [ "PREVISION_DU_BENEVOLAT", "/Savoir-faire/Autogestion/Bénévolat/Prévision", "index"
35 ];
36 $search_db = # db, auth required, page having the search, pages indexed
37 [ 'wiki', 0
38 , '*'
39 , '*
40 and !recentchanges/*
41 and !templates
42 and !templates/*'
43 ];
44 $userdir = '/Camarade';
45 }
46 my $sharedir = $ENV{IKIWIKI_SHARE} ? $ENV{IKIWIKI_SHARE} : '/usr/share/ikiwiki';
47 my ($account_creation_password);
48 my ($sslcookie, $umask, $url, $urls, @wrappers);
49 if (-x "/home/www/data/cyclo-$wiki") {
50 $account_creation_password = IkiWiki::readfile(catdir(dirname($srcdir), 'etc', 'account_creation_password'));
51 $destdir = "/home/www/data/cyclo-$wiki";
52 $srcdir = ((-x "$srcdir/Public")
53 ? "/home/cyclo/var/ikiwiki/cyclo-$wiki/src"
54 : "/home/cyclo/var/ikiwiki/cyclo-3615/src/Public"
55 );
56 $sslcookie = 1;
57 $umask = 002;
58 $url = '/';
59 $urls = "https://$wiki.cyclocoop.org/";
60 @wrappers =
61 ( { cgi => 1
62 , wrapper => $destdir."/cgi/ikiwiki.cgi"
63 , wrappermode => "00750"
64 }
65 # , { cgi => 1
66 # , wrapper => $destdir."/3615/cgi/ikiwiki.cgi"
67 # , wrappermode => "00750"
68 # }
69 , { post_commit => 1
70 , wrapper => "/home/git/hooks/cyclo/cyclo-$wiki/post-update.ikiwiki"
71 , wrappermode => "06751"
72 , wrapper_background_command => ""
73 }
74 );
75 }
76 else {
77 $sslcookie = 0;
78 $umask = 002;
79 $url = '/';
80 $urls = '/';
81 @wrappers =
82 ( { cgi => 1
83 , wrapper => $destdir."/cgi/ikiwiki.cgi"
84 , wrappermode => "00755"
85 }
86 );
87 $account_creation_password = '';
88 }
89 print "srcdir=$srcdir\n";
90 print "destdir=$destdir\n";
91 %setup_args =
92 ( ENV => {}
93 , account_creation_password => $account_creation_password
94 , add_plugins => [qw{
95 404
96 action
97 anonok
98 attachment
99 brokenlinks
100 comments
101 cutpaste
102 editdiff
103 events
104 favicon
105 img
106 inline
107 link
108 linkmap
109 map
110 moderatedcomments
111 orphans
112 pagecount
113 pagestats
114 passwordauth
115 poll
116 progress
117 recentchanges
118 recentchangesdiff
119 remove
120 rename
121 repolist
122 search
123 sidebar2
124 signinedit
125 table
126 tag
127 template
128 theme
129 toc
130 trail
131 userlist
132 }]
133 #, add_underlays => []
134 , adminemail => 'admin+'."$wiki".'@cyclocoop.org'
135 , adminuser => [qw{
136 anne-lise
137 Giampiero
138 julm
139 Nicolas
140 Severine
141 Tania
142 tilman
143 }]
144 #, aggregate_webtrigger => 0
145 #, aggregateinternal => 1
146 , allow_symlinks_before_srcdir => 0
147 , allowatom => 1
148 #, allowed_attachments =>
149 # '(mimetype(image/*) and maxsize(100kb)) or
150 # (mimetype(application/pdf) and maxsize(2mb))'
151 #, allowrss => 0
152 , anonok_pagespec => 'postcomment(*)'
153 #, archive_pagespec => 'posts/* and !*/Discussion'
154 , archive_pagespec => '!*'
155 , archivebase => undef
156 , atom => 1
157 , attachment =>
158 { insert => 'Lier'
159 , rename => 'Renommer'
160 , remove => 'Détacher'
161 , upload => 'Attacher'
162 }
163 , backlinks =>
164 { map_id => 'backlink'
165 , map_tmpl => 'map-doc'
166 , page => 'backlinks'
167 , title => 'rétro-liens'
168 , tmpl => 'page.tmpl'
169 }
170 , banned_users => []
171 #, blogspam_options => 'blacklist=1.2.3.4,blacklist=8.7.6.5,max-links=10'
172 #, blogspam_pagespec => 'postcomment(*)'
173 #, blogspam_server => ''
174 #, camelcase_ignore => []
175 #, cgi_wrapper => 'cgi/ikiwiki.cgi'
176 #, cgi_wrappermode => '02750'
177 , cgiauthurl => $urls.'/cgi/ikiwiki.cgi'
178 , cgiurl => $url.'cgi/ikiwiki.cgi'
179 , comments_allowauthor => 1
180 , comments_allowdirectives => 0
181 , comments_closed_pagespec => 'index or blog/controversial or blog/flamewar'
182 , comments_commit => 1
183 , comments_pagename => 'comment_'
184 , comments_pagespec => '(Agenda/*/*/* or Presse/*/*/* or vélo/*) and !*/Discussion'
185 , default_file => 'default.mdwn'
186 , default_pageext => 'mdwn'
187 , destdir => $destdir
188 , diffurl => "/gitweb/?p=cyclowiki.git;a=blobdiff;f=[[file]];h=[[sha1_to]];hp=[[sha1_from]];hb=[[sha1_commit]];hpb=[[sha1_parent]]"
189 #, directive_description_dir => 'ikiwiki/directive'
190 , disable_plugins => [qw{
191 headinganchors
192 htmlbalance
193 htmlscrubber
194 httpauth
195 lockedit
196 more
197 openid
198 po
199 prettydate
200 shortcut
201 toggle
202 }]
203 , discussion => 1
204 , discussionpage => 'Discussion'
205 , edit =>
206 { cancel => 'Annuler'
207 , diff => 'Comparer'
208 , location => 'Emplacement'
209 , preview => 'Apercevoir'
210 , remove => 'Supprimer'
211 , rename => 'Bouger'
212 , save => 'Sauvegarder'
213 , title => 'édition'
214 , type => 'Type'
215 }
216 , exclude => qr{^(\.git|\.ikiwiki|Public/\.ikiwiki(|/.*)|Public/recentchanges(|/.*)|Public-www(|/.*))$}
217 , external_links => qr{^(git)(/.*|$)}
218 , getsource_mimetype => 'text/plain; charset=utf-8'
219 , gitmaster_branch => "master"
220 , gitorigin_branch => "origin"
221 #, global_sidebars => '*'
222 , global_sidebars =>
223 [ "TOC", "toc", "/None"
224 , "IMAGE", "image", "/None"
225 , @$global_sidebars
226 ]
227 , hardlink => 0
228 , historyurl => "/gitweb/?p=cyclowiki.git;a=history;f=[[file]]"
229 , html5 => 1
230 , htmlext => 'html'
231 , htmlscrubber_skip => '!*/Discussion',
232 , httpauth_pagespec => '!*/Discussion and !SandBox'
233 #, include => '^\\.htaccess$'
234 , indexpages => 0
235 , libdir => $srcdir.'/.ikiwiki/lib'
236 , locale => 'fr_FR.UTF-8'
237 , locked_pages => '!*/Discussion and !/SandBox',
238 #, mirrorlist => {}
239 #, moderate_pagespec => 'user(http://*)'
240 , multimarkdown => 1
241 , newevent_base => 'Agenda'
242 , numbacklinks => 1000
243 , omega_cgi => '/usr/lib/cgi-bin/omega/omega'
244 #, openid_cgiurl => ''
245 #, openid_realm => ''
246 #, openidsignup => 'http://myopenid.com/'
247 , password_cost => 8
248 #, pinger_timeout => 15
249 , pingurl => []
250 , po_link_to => 'current'
251 , po_master_language => 'fr|Français'
252 , po_slave_languages =>
253 [ 'en|English'
254 , 'es|Español'
255 , 'de|Deutsch'
256 , 'it|Italiano'
257 ]
258 , po_translatable_pages => '*'
259 , prefix_directives => 1
260 #, prefsurl => "https://$ENV{site}/cgi/ikiwiki.cgi"
261 #, prettydateformat => '%X, %B %o, %Y'
262 , rcs => "git"
263 , recentchangesnum => 100
264 , recentchangespage => 'recentchanges'
265 , repositories =>
266 [ "git://git.cyclocoop.org/cyclowiki"
267 , "git\@git.cyclocoop.org:cyclowiki" ]
268 , rss => 0
269 #, rsync_command => 'rsync -qa --delete . user@host:/path/to/docroot/'
270 , search_db => $search_db
271 , srcdir => $srcdir
272 , sslcookie => $sslcookie
273 #, syslog => 1
274 , tag =>
275 { map_id => 'backlink'
276 , map_tmpl => 'map-doc'
277 , page => 'tag'
278 , title => 'étiquette'
279 , tmpl => 'page.tmpl'
280 }
281 #, tagbase => 'tag'
282 , templatedir => catdir($sharedir, 'templates')
283 #, teximg_dvipng => ''
284 #, teximg_postfix => '\\end{document}'
285 #, teximg_prefix => '\\documentclass{article}
286 # \\usepackage{amsmath}
287 # \\usepackage{amsfonts}
288 # \\usepackage{amssymb}
289 # \\pagestyle{empty}
290 # \\begin{document}'
291 #, theme => 'actiontabs'
292 , theme => 'actiontabs'
293 , timeformat => '%c'
294 , toc =>
295 { back => '↑ '
296 , id => 'may-be-invalid'
297 }
298 #, tohighlight => '.c .h .cpp .pl .py Makefile:make'
299 , umask => $umask
300 #, underlaydir => catdir($sharedir, '.basewiki')
301 #, untrusted_committers => undef
302 , url => $url
303 , usedirs => 1
304 , userdir => $userdir
305 , verbose => 1
306 #, virus_checker => 'clamdscan -'
307 #, websetup_force_plugins => []
308 #, websetup_show_unsafe => 1
309 #, websetup_unsafe => []
310 , week_start_day => 1
311 , wiki_file_chars => "-[:alnum:]+/.:_'’,()«»"
312 , wiki_file_regexp => qr/(^[-[:alnum:]+\/.:_'’,()«»]+$)/
313 #, wiki_file_chars => '-[:alnum:]+/.:_@’()&'
314 #, wrappergroup => 'ikiwiki'
315 , wikiname => $wikiname
316 , wrappers => \@wrappers
317 );
318 }
319 use IkiWiki::Setup::Standard \%setup_args;