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