ajout : machinerie des commentaires
[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 julm
94 }]
95 #, aggregate_webtrigger => 0
96 #, aggregateinternal => 1
97 , allow_symlinks_before_srcdir => 0
98 , allowatom => 1
99 #, allowed_attachments =>
100 # '(mimetype(image/*) and maxsize(100kb)) or
101 # (mimetype(application/pdf) and maxsize(2mb))'
102 #, allowrss => 0
103 , anonok_pagespec => 'postcomment(*)'
104 #, archive_pagespec => 'posts/* and !*/Discussion'
105 , archive_pagespec => '!*'
106 , archivebase => undef
107 , atom => 1
108 , attachment =>
109 { insert => 'Lier'
110 , rename => 'Renommer'
111 , remove => 'Détacher'
112 , upload => 'Attacher'
113 }
114 , backlinks =>
115 { map_id => 'backlink'
116 , map_tmpl => 'map-doc'
117 , page => 'backlinks'
118 , title => 'rétro-liens'
119 , tmpl => 'page.tmpl'
120 }
121 , banned_users => []
122 #, blogspam_options => 'blacklist=1.2.3.4,blacklist=8.7.6.5,max-links=10'
123 #, blogspam_pagespec => 'postcomment(*)'
124 #, blogspam_server => ''
125 #, camelcase_ignore => []
126 #, cgi_wrapper => 'cgi/ikiwiki.cgi'
127 #, cgi_wrappermode => '02750'
128 , cgiauthurl => $urls.'cgi/ikiwiki.cgi'
129 , cgiurl => $url.'cgi/ikiwiki.cgi'
130 , comments_allowauthor => 1
131 , comments_allowdirectives => 0
132 , comments_closed_pagespec => 'index or blog/controversial or blog/flamewar'
133 , comments_commit => 1
134 , comments_pagename => 'comment_'
135 , comments_pagespec => '(Agenda/*/*/* or Presse/*/*/* or vélo/*) and !*/Discussion'
136 , default_file => 'default.mdwn'
137 , default_pageext => 'mdwn'
138 , destdir => $destdir
139 , diffurl => "/gitweb/?p=cyclowiki.git;a=blobdiff;f=[[file]];h=[[sha1_to]];hp=[[sha1_from]];hb=[[sha1_commit]];hpb=[[sha1_parent]]"
140 #, directive_description_dir => 'ikiwiki/directive'
141 , disable_plugins => [qw{
142 headinganchors
143 httpauth
144 lockedit
145 more
146 openid
147 po
148 prettydate
149 shortcut
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',
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;