summaryrefslogtreecommitdiff
path: root/auto-blog.setup
blob: 35a6fc16167e912aca2ef5382f11b91a478e882e (plain)
  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. require IkiWiki::Setup::Automator;
  14. our $wikiname=IkiWiki::Setup::Automator::ask(
  15. gettext("What will the blog be named?"), gettext("blog"));
  16. our $rcs=IkiWiki::Setup::Automator::ask(
  17. gettext("What revision control system to use?"), "git");
  18. our $admin=IkiWiki::Setup::Automator::ask(
  19. gettext("What wiki user (or openid) will be admin?"), $ENV{USER});
  20. use Net::Domain q{hostfqdn};
  21. our $domain=hostfqdn() || ikiwiki::setup::automator::ask(
  22. gettext("What is the domain name of the web server?"), "");
  23. IkiWiki::Setup::Automator->import(
  24. wikiname => $wikiname,
  25. adminuser => [$admin],
  26. rcs => $rcs,
  27. srcdir => "$ENV{HOME}/$wikiname",
  28. destdir => "$ENV{HOME}/public_html/$wikiname",
  29. repository => "$ENV{HOME}/$wikiname.".($rcs eq "monotone" ? "mtn" : $rcs),
  30. dumpsetup => "$ENV{HOME}/$wikiname.setup",
  31. url => "http://$domain/~$ENV{USER}/$wikiname",
  32. cgiurl => "http://$domain/~$ENV{USER}/$wikiname/ikiwiki.cgi",
  33. cgi_wrapper => "$ENV{HOME}/public_html/$wikiname/ikiwiki.cgi",
  34. adminemail => "$ENV{USER}\@$domain",
  35. add_plugins => [qw{goodstuff websetup comments}],
  36. disable_plugins => [qw{}],
  37. libdir => "$ENV{HOME}/.ikiwiki",
  38. rss => 1,
  39. atom => 1,
  40. syslog => 1,
  41. hardlink => 1,
  42. example => "blog",
  43. comments_pagespec => "posts/* and !*/Discussion",
  44. discussion => 0,
  45. )