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