# is entered
my $page=lc($q->param('title'));
$page=~y/ /_/;
- $page=~s/([^-A-Za-z0-9_:+/])/"__".ord($1)."__"/eg;
+ $page=~s/([^-A-Za-z0-9_:+\/])/"__".ord($1)."__"/eg;
# if the page already exist, munge it to be unique
my $from=$q->param('from');
my $add="";
eval $code;
error($@) if $@;
+
exit;
} #}}}
sub setup_standard {
my %setup=%{$_[1]};
- debug("generating wrappers..");
- my %startconfig=(%config);
- foreach my $wrapper (@{$setup{wrappers}}) {
- %config=(%startconfig, verbose => 0, %setup, %{$wrapper});
- checkconfig();
- gen_wrapper();
+ if (! $config{refresh}) {
+ debug("generating wrappers..");
+ my %startconfig=(%config);
+ foreach my $wrapper (@{$setup{wrappers}}) {
+ %config=(%startconfig, verbose => 0, %setup, %{$wrapper});
+ checkconfig();
+ gen_wrapper();
+ }
+ %config=(%startconfig);
}
- %config=(%startconfig);
-
- debug("rebuilding wiki..");
foreach my $c (keys %setup) {
$config{$c}=possibly_foolish_untaint($setup{$c})
if defined $setup{$c} && ! ref $setup{$c};
}
- $config{rebuild}=1;
+ if (! $config{refresh}) {
+ $config{rebuild}=1;
+ debug("rebuilding wiki..");
+ }
+ else {
+ debug("refreshing wiki..");
+ }
checkconfig();
lockwiki();
will linger around and not be deleted.
* Currently only one blog is supported per page. Attempts to add more
will make it only update one of the blogs on the page.
+* If I edit blog/entry/blog_moved, add a link to code/ikiwiki, and hit
+ preview, it doesn't get the link right because it makes it relative to
+ where the page will be saved to, not to where the cgi script is.
Force a rebuild of all pages.
+* --refresh
+
+ Refresh the wiki, updating any changes pages. This is the default
+ behavior so you don't normally need to specify it.
+
* --fixctime
Pull last changed time for all pages out of the revision control system.
* --setup configfile
In setup mode, ikiwiki reads the config file, which is really a perl
- program that can call ikiwiki internal functions. Uses of this are
- various; the normal one is to automatically generate wrappers for a
- wiki based on data in a config file.
-
- Note that the wiki will be (re)built as part of the setup process to
- ensure that any changes take effect.
+ program that can call ikiwiki internal functions.
+
+ The default action when --setup is specified is to automatically generate
+ wrappers for a wiki based on data in a config file, and rebuild the wiki.
+ If you also pass the --refresh option, ikiwiki will instead just refresh
+ the wiki described in the setup file.
[[ikiwiki.setup]] is an example of such a config file.
anonok => 0,
rss => 0,
rebuild => 0,
+ refresh => 0,
getctime => 0,
wrapper => undef,
wrappermode => undef,
"wikiname=s" => \$config{wikiname},
"verbose|v!" => \$config{verbose},
"rebuild!" => \$config{rebuild},
+ "refresh!" => \$config{refresh},
"getctime" => \$config{getctime},
"wrappermode=i" => \$config{wrappermode},
"svn!" => \$config{svn},