* Add a htmlext config option, this can be used to make ikiwiki generate
html files with a different extension.master
parent
4de235a385
commit
1612dce6bb
|
@ -54,6 +54,7 @@ sub defaultconfig () { #{{{
|
|||
syslog => 0,
|
||||
wikiname => "wiki",
|
||||
default_pageext => "mdwn",
|
||||
htmlext => "html",
|
||||
cgi => 0,
|
||||
post_commit => 0,
|
||||
rcs => '',
|
||||
|
@ -256,7 +257,7 @@ sub targetpage ($$) { #{{{
|
|||
sub htmlpage ($) { #{{{
|
||||
my $page=shift;
|
||||
|
||||
return targetpage($page, "html");
|
||||
return targetpage($page, $config{htmlext});
|
||||
} #}}}
|
||||
|
||||
sub srcfile ($) { #{{{
|
||||
|
@ -466,7 +467,7 @@ sub displaytime ($) { #{{{
|
|||
sub beautify_url ($) { #{{{
|
||||
my $url=shift;
|
||||
|
||||
$url =~ s!/index.html$!/!;
|
||||
$url =~ s!/index.$config{htmlext}$!/!;
|
||||
$url =~ s!^$!./!; # Browsers don't like empty links...
|
||||
|
||||
return $url;
|
||||
|
|
|
@ -475,7 +475,7 @@ sub pagefile ($) { #{{{
|
|||
} #}}}
|
||||
|
||||
sub htmlfn ($) { #{{{
|
||||
return shift().".html";
|
||||
return shift().".".$config{htmlext};
|
||||
} #}}}
|
||||
|
||||
1
|
||||
|
|
|
@ -6,8 +6,10 @@ ikiwiki (2.5) UNRELEASED; urgency=low
|
|||
* Correct some issues with escaped preprocessor directives.
|
||||
* Make the map plugin notice when pages in the map are deleted and update
|
||||
it.
|
||||
* Add a htmlext config option, this can be used to make ikiwiki generate
|
||||
html files with a different extension.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Tue, 24 Jul 2007 20:58:19 -0400
|
||||
-- Joey Hess <joeyh@debian.org> Tue, 24 Jul 2007 21:11:30 -0400
|
||||
|
||||
ikiwiki (2.4) unstable; urgency=low
|
||||
|
||||
|
|
|
@ -86,6 +86,8 @@ use IkiWiki::Setup::Standard {
|
|||
# To exclude files matching a regexp from processing. This adds to
|
||||
# the default exclude list.
|
||||
#exclude => qr/*\.wav/,
|
||||
# To change the extension used for generated html files.
|
||||
#htmlext => '.htm',
|
||||
# Time format (for strftime)
|
||||
#timeformat => '%c',
|
||||
# Locale to use. Must be a UTF-8 locale.
|
||||
|
|
|
@ -245,6 +245,10 @@ configuration options of their own.
|
|||
subdirectory of the wiki. The default is to link to pages in the toplevel
|
||||
directory of the wiki.
|
||||
|
||||
* --htmlext html
|
||||
|
||||
Configures the extension used for generated html files. Default is "html".
|
||||
|
||||
* --timeformat format
|
||||
|
||||
Specify how to display the time or date. The format string is passed to the
|
||||
|
|
|
@ -49,6 +49,7 @@ sub getconfig () { #{{{
|
|||
"sslcookie!" => \$config{sslcookie},
|
||||
"httpauth!" => \$config{httpauth},
|
||||
"userdir=s" => \$config{userdir},
|
||||
"htmlext=s" => \$config{htmlext},
|
||||
"exclude=s@" => sub {
|
||||
push @{$config{wiki_file_prune_regexps}}, $_[1];
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue