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