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