#!/usr/bin/perl use vars qw/%setup_args/; BEGIN { use File::Basename; use File::Spec::Functions; my $srcdir = dirname($IkiWiki::config{'setupfile'}); my $sharedir = $ENV{IKIWIKI_SHARE} ? $ENV{IKIWIKI_SHARE} : '/usr/share/ikiwiki'; print "srcdir=$srcdir\n"; my ($account_creation_password); my ($destdir, $sslcookie, $umask, $url, $urls, @wrappers); if (-x '/home/www/data/cyclo-wiki') { $destdir = '/home/www/data/cyclo-wiki'; $srcdir = '/home/cyclo/var/ikiwiki/cyclo-wiki/src'; $sslcookie = 1; $umask = 002; $url = '/'; $urls = 'https://wiki.cyclocoop.org/'; @wrappers = ( { cgi => 1 , wrapper => $destdir."/cgi/ikiwiki.cgi" , wrappermode => "00750" } # , { cgi => 1 # , wrapper => $destdir."/3615/cgi/ikiwiki.cgi" # , wrappermode => "00750" # } , { post_commit => 1 , wrapper => "/home/git/hooks/cyclo/cyclo-wiki/post-update.ikiwiki" , wrappermode => "06751" , wrapper_background_command => "" } ); $account_creation_password = IkiWiki::readfile(catdir(dirname($srcdir), 'etc', 'account_creation_password')); } else { $destdir = $srcdir.'-www'; $sslcookie = 0; $umask = 002; $url = '/'; $urls = '/'; @wrappers = ( { cgi => 1 , wrapper => $destdir."/cgi/ikiwiki.cgi" , wrappermode => "00755" } ); $account_creation_password = ''; } %setup_args = ( ENV => {} , account_creation_password => $account_creation_password , add_plugins => [qw{ 404 action anonok attachment brokenlinks comments cutpaste editdiff events favicon img inline link linkmap map moderatedcomments orphans pagecount pagestats passwordauth poll progress recentchanges recentchangesdiff remove rename repolist search sidebar2 signinedit table tag template theme toc trail userlist }] #, add_underlays => [] , adminemail => 'admin+wiki@cyclocoop.org' , adminuser => [qw{ anne-lise Giampiero julm Nicolas Severine Tania tilman }] #, aggregate_webtrigger => 0 #, aggregateinternal => 1 , allow_symlinks_before_srcdir => 0 , allowatom => 1 #, allowed_attachments => # '(mimetype(image/*) and maxsize(100kb)) or # (mimetype(application/pdf) and maxsize(2mb))' #, allowrss => 0 , anonok_pagespec => 'postcomment(*)' #, archive_pagespec => 'posts/* and !*/Discussion' , archive_pagespec => '!*' , archivebase => undef , atom => 1 , attachment => { insert => 'Lier' , rename => 'Renommer' , remove => 'Détacher' , upload => 'Attacher' } , backlinks => { map_id => 'backlink' , map_tmpl => 'map-doc' , page => 'backlinks' , title => 'rétro-liens' , tmpl => 'page.tmpl' } , banned_users => [] #, blogspam_options => 'blacklist=1.2.3.4,blacklist=8.7.6.5,max-links=10' #, blogspam_pagespec => 'postcomment(*)' #, blogspam_server => '' #, camelcase_ignore => [] #, cgi_wrapper => 'cgi/ikiwiki.cgi' #, cgi_wrappermode => '02750' , cgiauthurl => $urls.'3615/cgi/ikiwiki.cgi' , cgiurl => $url.'cgi/ikiwiki.cgi' , comments_allowauthor => 1 , comments_allowdirectives => 0 , comments_closed_pagespec => 'index or blog/controversial or blog/flamewar' , comments_commit => 1 , comments_pagename => 'comment_' , comments_pagespec => '(Agenda/*/*/* or Presse/*/*/* or vélo/*) and !*/Discussion' , default_file => 'default.mdwn' , default_pageext => 'mdwn' , destdir => $destdir , diffurl => "/gitweb/?p=cyclowiki.git;a=blobdiff;f=[[file]];h=[[sha1_to]];hp=[[sha1_from]];hb=[[sha1_commit]];hpb=[[sha1_parent]]" #, directive_description_dir => 'ikiwiki/directive' , disable_plugins => [qw{ headinganchors htmlbalance htmlscrubber httpauth lockedit more openid po prettydate shortcut toggle }] , discussion => 1 , discussionpage => 'Discussion' , edit => { cancel => 'Annuler' , diff => 'Comparer' , location => 'Emplacement' , preview => 'Apercevoir' , remove => 'Supprimer' , rename => 'Bouger' , save => 'Sauvegarder' , title => 'édition' , type => 'Type' } , exclude => '^/etc$' , external_links => qr{^(git)(/.*|$)} , getsource_mimetype => 'text/plain; charset=utf-8' , gitmaster_branch => "master" , gitorigin_branch => "origin" #, global_sidebars => '*' , global_sidebars => [ "TOC", "toc", "/None" , "IMAGE", "image", "/None" #, "METROLOGIE", "/Savoir-faire/Autogestion/Bénévolat/Métrologie", "index" ] , hardlink => 0 , historyurl => "/gitweb/?p=cyclowiki.git;a=history;f=[[file]]" , html5 => 1 , htmlext => 'html' , htmlscrubber_skip => '!*/Discussion', , httpauth_pagespec => '!*/Discussion and !SandBox' #, include => '^\\.htaccess$' , indexpages => 0 , libdir => $srcdir.'/.ikiwiki/lib' , locale => 'fr_FR.UTF-8' , locked_pages => '!*/Discussion and !/SandBox', #, mirrorlist => {} #, moderate_pagespec => 'user(http://*)' , multimarkdown => 1 , newevent_base => 'Agenda' , numbacklinks => 1000 , omega_cgi => '/usr/lib/cgi-bin/omega/omega' #, openid_cgiurl => '' #, openid_realm => '' #, openidsignup => 'http://myopenid.com/' , password_cost => 8 #, pinger_timeout => 15 , pingurl => [] , po_link_to => 'current' , po_master_language => 'fr|Français' , po_slave_languages => [ 'en|English' , 'es|Español' , 'de|Deutsch' , 'it|Italiano' ] , po_translatable_pages => '*' , prefix_directives => 1 #, prefsurl => "https://$ENV{site}/cgi/ikiwiki.cgi" #, prettydateformat => '%X, %B %o, %Y' , rcs => "git" , recentchangesnum => 100 , recentchangespage => 'recentchanges' , repositories => [ "git://git.cyclocoop.org/cyclowiki" , "git\@git.cyclocoop.org:cyclowiki" ] , rss => 0 #, rsync_command => 'rsync -qa --delete . user@host:/path/to/docroot/' , search_db => # db, auth required, page having the search, pages indexed [ '3615', 1 , '3615 or 3615/*' , '(3615 or 3615/*) and !3615/recentchanges/* and !3615/templates/* and !3615/templates' , 'CycloWiki', 0 , '* and !3615 and !3615/*' , '* and !recentchanges/* and !templates and !templates/* and !3615 and !3615/*' ] , srcdir => $srcdir , sslcookie => $sslcookie #, syslog => 1 , tag => { map_id => 'backlink' , map_tmpl => 'map-doc' , page => 'tag' , title => 'étiquette' , tmpl => 'page.tmpl' } #, tagbase => 'tag' , templatedir => catdir($sharedir, 'templates') #, teximg_dvipng => '' #, teximg_postfix => '\\end{document}' #, teximg_prefix => '\\documentclass{article} # \\usepackage{amsmath} # \\usepackage{amsfonts} # \\usepackage{amssymb} # \\pagestyle{empty} # \\begin{document}' #, theme => 'actiontabs' , theme => 'actiontabs' , timeformat => '%c' , toc => { back => '↑ ' , id => 'may-be-invalid' } #, tohighlight => '.c .h .cpp .pl .py Makefile:make' , umask => $umask #, underlaydir => catdir($sharedir, '.basewiki') #, untrusted_committers => undef , url => $url , usedirs => 1 , userdir => 'Camarade' , verbose => 1 #, virus_checker => 'clamdscan -' #, websetup_force_plugins => [] #, websetup_show_unsafe => 1 #, websetup_unsafe => [] , week_start_day => 1 , wiki_file_chars => "-[:alnum:]+/.:_'’,()«»" , wiki_file_regexp => qr/(^[-[:alnum:]+\/.:_'’,()«»]+$)/ #, wiki_file_chars => '-[:alnum:]+/.:_@’()&' #, wrappergroup => 'ikiwiki' , wikiname => 'CycloWiki' , wrappers => \@wrappers ); } use IkiWiki::Setup::Standard \%setup_args;