]> sipb.mit.edu Git - ikiwiki.git/blob - auto-blog.setup
Don't bother to save {depends} to the index
[ikiwiki.git] / auto-blog.setup
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.
7 #
8 # Just run: ikiwiki -setup /etc/ikiwiki/auto-blog.setup
9 #
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.
13
14 require IkiWiki::Setup::Automator;
15
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?"), "");
25
26 IkiWiki::Setup::Automator->import(
27         wikiname => $wikiname,
28         adminuser => [$admin],
29         rcs => $rcs,
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",
41         rss => 1,
42         atom => 1,
43         syslog => 1,
44         
45         example => "blog",
46         comments_pagespec => "posts/* and !*/Discussion",
47         blogspam_pagespec => "postcomment(*)",
48         discussion => 0,
49 )