diff options
-rwxr-xr-x | Makefile.PL | 4 | ||||
-rw-r--r-- | doc/ikiwiki.setup | 4 | ||||
-rw-r--r-- | doc/setup.mdwn | 11 | ||||
-rw-r--r-- | doc/usage.mdwn | 10 | ||||
-rwxr-xr-x | ikiwiki | 13 |
5 files changed, 23 insertions, 19 deletions
diff --git a/Makefile.PL b/Makefile.PL index e5d05dea4..70d81b806 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -12,8 +12,8 @@ install:: extra_install pure_install:: extra_install extra_build: - ./ikiwiki doc templates html --wikiname="ikiwiki" --verbose \ - --nosvn --exclude=/discussion + ./ikiwiki doc html --templatedir=templates --wikiname="ikiwiki" \ + --verbose --nosvn --exclude=/discussion ./mdwn2man doc/usage.mdwn > ikiwiki.man extra_clean: diff --git a/doc/ikiwiki.setup b/doc/ikiwiki.setup index 7a561434e..374093a5e 100644 --- a/doc/ikiwiki.setup +++ b/doc/ikiwiki.setup @@ -12,12 +12,12 @@ use IkiWiki::Setup::Standard { # Be sure to customise these.. srcdir => "/path/to/source", destdir => "/var/www/wiki", - templatedir => "/usr/share/ikiwiki/templates", - + url => "http://myhost/wiki", cgiurl => "http://myhost/ikiwiki.cgi", #historyurl => "http://svn.myhost/trunk/[[file]]", #diffurl => "http://svn.someurl/trunk/[[file]]?root=wiki&r1=[[r1]]&r2=[[r2]]", + #templatedir => "/usr/share/ikiwiki/templates", # Whether to integrate with svn. svn => 1, diff --git a/doc/setup.mdwn b/doc/setup.mdwn index 44e60ae97..69972ca52 100644 --- a/doc/setup.mdwn +++ b/doc/setup.mdwn @@ -29,11 +29,10 @@ optional support for commits from the web. 5. Build your wiki for the first time. - ikiwiki --verbose ~/wikiwc/ \ - /usr/share/ikiwiki/templates ~/public_html/wiki/ \ - --url=http://host/~you/wiki/ + ikiwiki --verbose ~/wikiwc/ ~/public_html/wiki/ \ + --url=http://host/~you/wiki/ - Replace the url with the right url to your wiki. You should now + Replace the url with the real url to your wiki. You should now be able to visit the url and see your page that you created earlier. 6. Repeat steps 4 and 5 as desired, editing or adding pages and rebuilding @@ -50,8 +49,8 @@ optional support for commits from the web. `doc/ikiwiki.setup` in the ikiwiki sources), and edit it. Most of the options, like `wikiname` in the setup file are the same as - ikiwiki's command line options (documented in [[usage]]. `srcdir`, - `templatedir` and `destdir` are the three directories you specify when + ikiwiki's command line options (documented in [[usage]]. `srcdir` + and `destdir` are the two directories you specify when running ikiwiki by hand. `svnrepo` is the path to your subversion repository. Make sure that all of these are pointing to the right directories, and read through and configure the rest of the file to your diff --git a/doc/usage.mdwn b/doc/usage.mdwn index 7d7acf16a..83866c1a8 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -4,15 +4,14 @@ ikiwiki - a wiki compiler # SYNOPSIS -ikiwiki [options] source templates destination +ikiwiki [options] source destination ikiwiki --setup configfile # DESCRIPTION `ikiwiki` is a wiki compiler. It builds static html pages for a wiki, from -`source` in the [[MarkDown]] language, using the specified html `templates` -and writes it out to `destination`. +`source` in the [[MarkDown]] language, and writes it out to `destination`. # OPTIONS @@ -31,6 +30,11 @@ flags such as --verbose can be negated with --no-verbose. Force a rebuild of all pages. +* --templatedir + + Specify the directory that the page [[templates]] are stored in. + Default is `/usr/share/ikiwiki/templates`. + * --wrapper [file] Generate a [[wrapper]] binary that is hardcoded to do action specified by @@ -33,7 +33,7 @@ our %config=( #{{{ wrappermode => undef, srcdir => undef, destdir => undef, - templatedir => undef, + templatedir => "/usr/share/ikiwiki/templates", setup => undef, adminuser => undef, ); #}}} @@ -56,12 +56,12 @@ GetOptions( #{{{ $config{wiki_file_prune_regexp}=qr/$config{wiki_file_prune_regexp}|$_[1]/; }, "adminuser=s@" => sub { push @{$config{adminuser}}, $_[1] }, + "templatedir=s" => sub { $config{templatedir}=possibly_foolish_untaint($_[1]) }, ) || usage(); if (! $config{setup}) { - usage() unless @ARGV == 3; + usage() unless @ARGV == 2; $config{srcdir} = possibly_foolish_untaint(shift); - $config{templatedir} = possibly_foolish_untaint(shift); $config{destdir} = possibly_foolish_untaint(shift); if ($config{cgi} && ! length $config{url}) { error("Must specify url to wiki with --url when using --cgi"); @@ -70,7 +70,7 @@ if (! $config{setup}) { #}}} sub usage { #{{{ - die "usage: ikiwiki [options] source templates dest\n"; + die "usage: ikiwiki [options] source dest\n"; } #}}} sub error { #{{{ @@ -772,8 +772,9 @@ sub gen_wrapper (@) { #{{{ error("cannot create a wrapper that uses a setup file"); } - my @params=($config{srcdir}, $config{templatedir}, $config{destdir}, - "--wikiname=$config{wikiname}"); + my @params=($config{srcdir}, $config{destdir}, + "--wikiname=$config{wikiname}", + "--templatedir=$config{templatedir}"); push @params, "--verbose" if $config{verbose}; push @params, "--rebuild" if $config{rebuild}; push @params, "--nosvn" if !$config{svn}; |