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