2 # Ikiwiki setup automator -- blog version.
4 # This setup file causes ikiwiki to create a wiki, containing a blog,
5 # check it into revision control, generate a setup file for the new
6 # wiki, and set everything up.
8 # Just run: ikiwiki -setup /etc/ikiwiki/auto-blog.setup
10 # By default, it asks a few questions, and confines itself to the user's home
11 # directory. You can edit it to change what it asks questions about, or to
12 # modify the values to use site-specific settings.
14 require IkiWiki::Setup::Automator;
16 our $wikiname=IkiWiki::Setup::Automator::ask(
17 gettext("What will the blog be named?"), gettext("blog"));
18 our $rcs=IkiWiki::Setup::Automator::ask(
19 gettext("What revision control system to use?"), "git");
20 our $admin=IkiWiki::Setup::Automator::ask(
21 gettext("What wiki user (or openid) will be admin?"), $ENV{USER});
22 use Net::Domain q{hostfqdn};
23 our $domain=hostfqdn() || ikiwiki::setup::automator::ask(
24 gettext("What is the domain name of the web server?"), "");
26 IkiWiki::Setup::Automator->import(
27 wikiname => $wikiname,
28 adminuser => [$admin],
30 srcdir => "$ENV{HOME}/$wikiname",
31 destdir => "$ENV{HOME}/public_html/$wikiname",
32 repository => "$ENV{HOME}/$wikiname.".($rcs eq "monotone" ? "mtn" : $rcs),
33 dumpsetup => "$ENV{HOME}/$wikiname.setup",
34 url => "http://$domain/~$ENV{USER}/$wikiname",
35 cgiurl => "http://$domain/~$ENV{USER}/$wikiname/ikiwiki.cgi",
36 cgi_wrapper => "$ENV{HOME}/public_html/$wikiname/ikiwiki.cgi",
37 adminemail => "$ENV{USER}\@$domain",
38 add_plugins => [qw{goodstuff websetup comments blogspam}],
39 disable_plugins => [qw{}],
40 libdir => "$ENV{HOME}/.ikiwiki",
46 comments_pagespec => "posts/* and !*/Discussion",
47 blogspam_pagespec => "postcomment(*)",