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