Test
[ikiwiki.git] / auto-blog.setup
blob0eb83ded614a2b4e2b2397bf8d2db897984317db
1 #!/usr/bin/perl
2 # Ikiwiki setup automator -- blog version.
3 #
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 $wikiname_short=IkiWiki::Setup::Automator::sanitize_wikiname($wikiname);
19 our $rcs=IkiWiki::Setup::Automator::ask(
20 gettext("What revision control system to use?"), "git");
21 our $admin=IkiWiki::Setup::Automator::ask(
22 gettext("What wiki user (or openid) will be admin?"), $ENV{USER});
23 use Net::Domain q{hostfqdn};
24 our $domain=hostfqdn() || IkiWiki::Setup::Automator::ask(
25 gettext("What is the domain name of the web server?"), "");
27 IkiWiki::Setup::Automator->import(
28 wikiname => $wikiname,
29 adminuser => [$admin],
30 rcs => $rcs,
31 srcdir => "$ENV{HOME}/$wikiname_short",
32 destdir => "$ENV{HOME}/public_html/$wikiname_short",
33 repository => "$ENV{HOME}/$wikiname_short.".($rcs eq "monotone" ? "mtn" : $rcs),
34 dumpsetup => "$ENV{HOME}/$wikiname_short.setup",
35 url => "http://$domain/~$ENV{USER}/$wikiname_short",
36 cgiurl => "http://$domain/~$ENV{USER}/$wikiname_short/ikiwiki.cgi",
37 cgi_wrapper => "$ENV{HOME}/public_html/$wikiname_short/ikiwiki.cgi",
38 adminemail => "$ENV{USER}\@$domain",
39 add_plugins => [qw{goodstuff websetup comments blogspam calendar sidebar}],
40 disable_plugins => [qw{}],
41 libdir => "$ENV{HOME}/.ikiwiki",
42 rss => 1,
43 atom => 1,
44 syslog => 1,
46 example => "blog",
47 comments_pagespec => "posts/* and !*/Discussion",
48 blogspam_pagespec => "postcomment(*)",
49 archive_pagespec => "page(posts/*) and !*/Discussion",
50 global_sidebars => 0,
51 discussion => 0,
52 locked_pages => "* and !postcomment(*)",
53 tagbase => "tags",