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