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