summaryrefslogtreecommitdiff
path: root/ikiwiki.pl
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-09-21 21:34:29 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-09-21 21:34:29 +0000
commitc35444826ca47123697a8f2512866f4f99964cc4 (patch)
treeb29bf3982c043867389e5ba4a4ee62789c93f4b2 /ikiwiki.pl
parent63f09c7cef0eb10d8051a92ff626bf1b5f29b9b0 (diff)
* Add --render mode, which can be used to preview an edit at the command
line by test rendering a single page.
Diffstat (limited to 'ikiwiki.pl')
-rwxr-xr-xikiwiki.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/ikiwiki.pl b/ikiwiki.pl
index aa0fd136a..b4cf0e64a 100755
--- a/ikiwiki.pl
+++ b/ikiwiki.pl
@@ -26,6 +26,7 @@ sub getconfig () { #{{{
"syslog!" => \$config{syslog},
"rebuild!" => \$config{rebuild},
"refresh!" => \$config{refresh},
+ "render=s" => \$config{render},
"wrappers!" => \$config{wrappers},
"getctime" => \$config{getctime},
"wrappermode=i" => \$config{wrappermode},
@@ -76,7 +77,7 @@ sub getconfig () { #{{{
},
) || usage();
- if (! $config{setup}) {
+ if (! $config{setup} && ! $config{render}) {
loadplugins();
usage() unless @ARGV == 2;
$config{srcdir} = possibly_foolish_untaint(shift @ARGV);
@@ -114,6 +115,10 @@ sub main () { #{{{
require IkiWiki::Wrapper;
gen_wrapper();
}
+ elsif ($config{render}) {
+ require IkiWiki::Render;
+ commandline_render();
+ }
else {
lockwiki();
loadindex();