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