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