Ajout : Savoir-faire : Installer_IkiWiki_sur_sa_propre_machine.
[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 calendar
60 comments
61 cutpaste
62 editdiff
63 favicon
64 htmlscrubber
65 img
66 inline
67 link
68 linkmap
69 map
70 moderatedcomments
71 newevent
72 orphans
73 pagecount
74 pagestats
75 passwordauth
76 poll
77 progress
78 recentchanges
79 recentchangesdiff
80 remove
81 rename
82 repolist
83 search
84 sidebar2
85 signinedit
86 table
87 tag
88 template
89 theme
90 toc
91 trail
92 userlist
93 }]
94 #, add_underlays => []
95 , adminemail => 'admin+wiki@cyclocoop.org'
96 , adminuser => [qw{
97 anne-lise
98 Giampiero
99 julm
100 Nicolas
101 Severine
102 Tania
103 tilman
104 }]
105 #, aggregate_webtrigger => 0
106 #, aggregateinternal => 1
107 , allow_symlinks_before_srcdir => 0
108 , allowatom => 1
109 #, allowed_attachments =>
110 # '(mimetype(image/*) and maxsize(100kb)) or
111 # (mimetype(application/pdf) and maxsize(2mb))'
112 #, allowrss => 0
113 , anonok_pagespec => 'postcomment(*)'
114 #, archive_pagespec => 'posts/* and !*/Discussion'
115 , archive_pagespec => '!*'
116 , archivebase => undef
117 , atom => 1
118 , attachment =>
119 { insert => 'Lier'
120 , rename => 'Renommer'
121 , remove => 'Détacher'
122 , upload => 'Attacher'
123 }
124 , backlinks =>
125 { map_id => 'backlink'
126 , map_tmpl => 'map-doc'
127 , page => 'backlinks'
128 , title => 'rétro-liens'
129 , tmpl => 'page.tmpl'
130 }
131 , banned_users => []
132 #, blogspam_options => 'blacklist=1.2.3.4,blacklist=8.7.6.5,max-links=10'
133 #, blogspam_pagespec => 'postcomment(*)'
134 #, blogspam_server => ''
135 #, camelcase_ignore => []
136 #, cgi_wrapper => 'cgi/ikiwiki.cgi'
137 #, cgi_wrappermode => '02750'
138 , cgiauthurl => $urls.'3615/cgi/ikiwiki.cgi'
139 , cgiurl => $url.'cgi/ikiwiki.cgi'
140 , comments_allowauthor => 1
141 , comments_allowdirectives => 0
142 , comments_closed_pagespec => 'index or blog/controversial or blog/flamewar'
143 , comments_commit => 1
144 , comments_pagename => 'comment_'
145 , comments_pagespec => '(Agenda/*/*/* or Presse/*/*/* or vélo/*) and !*/Discussion'
146 , default_file => 'default.mdwn'
147 , default_pageext => 'mdwn'
148 , destdir => $destdir
149 , diffurl => "/gitweb/?p=cyclowiki.git;a=blobdiff;f=[[file]];h=[[sha1_to]];hp=[[sha1_from]];hb=[[sha1_commit]];hpb=[[sha1_parent]]"
150 #, directive_description_dir => 'ikiwiki/directive'
151 , disable_plugins => [qw{
152 headinganchors
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 ]
185 , hardlink => 0
186 , historyurl => "/gitweb/?p=cyclowiki.git;a=history;f=[[file]]"
187 , html5 => 1
188 , htmlext => 'html'
189 , htmlscrubber_skip => '!*/Discussion',
190 , httpauth_pagespec => '!*/Discussion and !SandBox'
191 #, include => '^\\.htaccess$'
192 , indexpages => 0
193 , libdir => $srcdir.'/.ikiwiki/lib'
194 , locale => 'fr_FR.UTF-8'
195 , locked_pages => '!*/Discussion and !/SandBox',
196 #, mirrorlist => {}
197 #, moderate_pagespec => 'user(http://*)'
198 , multimarkdown => 1
199 , newevent_base => 'Agenda'
200 , numbacklinks => 1000
201 , omega_cgi => '/usr/lib/cgi-bin/omega/omega'
202 #, openid_cgiurl => ''
203 #, openid_realm => ''
204 #, openidsignup => 'http://myopenid.com/'
205 , password_cost => 8
206 #, pinger_timeout => 15
207 , pingurl => []
208 , po_link_to => 'current'
209 , po_master_language => 'fr|Français'
210 , po_slave_languages =>
211 [ 'en|English'
212 , 'es|Español'
213 , 'de|Deutsch'
214 , 'it|Italiano'
215 ]
216 , po_translatable_pages => '*'
217 , prefix_directives => 1
218 #, prefsurl => "https://$ENV{site}/cgi/ikiwiki.cgi"
219 #, prettydateformat => '%X, %B %o, %Y'
220 , rcs => "git"
221 , recentchangesnum => 100
222 , recentchangespage => 'recentchanges'
223 , repositories =>
224 [ "git://git.cyclocoop.org/cyclowiki"
225 , "git\@git.cyclocoop.org:cyclowiki" ]
226 , rss => 0
227 #, rsync_command => 'rsync -qa --delete . user@host:/path/to/docroot/'
228 , search_db => # db, auth required, page having the search, pages indexed
229 [ '3615', 1
230 , '3615 or 3615/*'
231 , '(3615 or 3615/*)
232 and !3615/recentchanges/*
233 and !3615/templates/*
234 and !3615/templates'
235 , 'CycloWiki', 0
236 , '*
237 and !3615
238 and !3615/*'
239 , '*
240 and !recentchanges/*
241 and !templates
242 and !templates/*
243 and !3615
244 and !3615/*'
245 ]
246 , srcdir => $srcdir
247 , sslcookie => $sslcookie
248 #, syslog => 1
249 , tag =>
250 { map_id => 'backlink'
251 , map_tmpl => 'map-doc'
252 , page => 'tag'
253 , title => 'étiquette'
254 , tmpl => 'page.tmpl'
255 }
256 #, tagbase => 'tag'
257 , templatedir => catdir($sharedir, 'templates')
258 #, teximg_dvipng => ''
259 #, teximg_postfix => '\\end{document}'
260 #, teximg_prefix => '\\documentclass{article}
261 # \\usepackage{amsmath}
262 # \\usepackage{amsfonts}
263 # \\usepackage{amssymb}
264 # \\pagestyle{empty}
265 # \\begin{document}'
266 #, theme => 'actiontabs'
267 , theme => 'actiontabs'
268 , timeformat => '%c'
269 , toc =>
270 { back => '↑ '
271 , id => 'may-be-invalid'
272 }
273 #, tohighlight => '.c .h .cpp .pl .py Makefile:make'
274 , umask => $umask
275 #, underlaydir => catdir($sharedir, '.basewiki')
276 #, untrusted_committers => undef
277 , url => $url
278 , usedirs => 1
279 , userdir => 'Camarade'
280 , verbose => 1
281 #, virus_checker => 'clamdscan -'
282 #, websetup_force_plugins => []
283 #, websetup_show_unsafe => 1
284 #, websetup_unsafe => []
285 , week_start_day => 1
286 , wiki_file_chars => "-[:alnum:]+/.:_'’,()«»"
287 , wiki_file_regexp => qr/(^[-[:alnum:]+\/.:_'’,()«»]+$)/
288 #, wiki_file_chars => '-[:alnum:]+/.:_@’()&'
289 #, wrappergroup => 'ikiwiki'
290 , wikiname => 'CycloWiki'
291 , wrappers => \@wrappers
292 );
293 }
294 use IkiWiki::Setup::Standard \%setup_args;