]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Add a htmlext config option, this can be used to make ikiwiki generate
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 25 Jul 2007 01:16:53 +0000 (01:16 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 25 Jul 2007 01:16:53 +0000 (01:16 +0000)
  html files with a different extension.

IkiWiki.pm
IkiWiki/Plugin/aggregate.pm
debian/changelog
doc/ikiwiki.setup
doc/usage.mdwn
ikiwiki.in

index b4c588c3a39f42bd383170b2b3938195da8cf8d7..e5d1c5c44e2d09c0ec1bd748df60f9665a23fd5b 100644 (file)
@@ -54,6 +54,7 @@ sub defaultconfig () { #{{{
        syslog => 0,
        wikiname => "wiki",
        default_pageext => "mdwn",
        syslog => 0,
        wikiname => "wiki",
        default_pageext => "mdwn",
+       htmlext => "html",
        cgi => 0,
        post_commit => 0,
        rcs => '',
        cgi => 0,
        post_commit => 0,
        rcs => '',
@@ -256,7 +257,7 @@ sub targetpage ($$) { #{{{
 sub htmlpage ($) { #{{{
        my $page=shift;
        
 sub htmlpage ($) { #{{{
        my $page=shift;
        
-       return targetpage($page, "html");
+       return targetpage($page, $config{htmlext});
 } #}}}
 
 sub srcfile ($) { #{{{
 } #}}}
 
 sub srcfile ($) { #{{{
@@ -466,7 +467,7 @@ sub displaytime ($) { #{{{
 sub beautify_url ($) { #{{{
        my $url=shift;
 
 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;
        $url =~ s!^$!./!; # Browsers don't like empty links...
 
        return $url;
index eb5067d9f5977cafea958e6e5849c4fd866a34c1..9636c5f94178d19f1eb4cb3ccb2e4c4ea45e08bc 100644 (file)
@@ -475,7 +475,7 @@ sub pagefile ($) { #{{{
 } #}}}
 
 sub htmlfn ($) { #{{{
 } #}}}
 
 sub htmlfn ($) { #{{{
-       return shift().".html";
+       return shift().".".$config{htmlext};
 } #}}}
 
 1
 } #}}}
 
 1
index 486ce16a0920f8a4c146b9b0cbebd6b41ec4feb3..b3310a4e089b4d462c94e1fe2fe6fa497dc84134 100644 (file)
@@ -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.
   * 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
 
 
 ikiwiki (2.4) unstable; urgency=low
 
index 12df4507fd6a7c5291539271ca340417601e78e7..a772ca60b703e8708ca8ca9bcb995de9fbe0bf0a 100644 (file)
@@ -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 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.
        # Time format (for strftime)
        #timeformat => '%c',
        # Locale to use. Must be a UTF-8 locale.
index 0107b36ce195255a6dc44a88de6629cb93a47002..57cdba167dc89c27e2fe408f0da9186ccb16aff8 100644 (file)
@@ -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.
 
   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
 * --timeformat format
 
   Specify how to display the time or date. The format string is passed to the
index b8acd61ea2c508d12e788764e01a1e3fc724e5ff..8cec3f5c0bac42c221ecd07c0d01cbc71ed8d9a3 100755 (executable)
@@ -49,6 +49,7 @@ sub getconfig () { #{{{
                        "sslcookie!" => \$config{sslcookie},
                        "httpauth!" => \$config{httpauth},
                        "userdir=s" => \$config{userdir},
                        "sslcookie!" => \$config{sslcookie},
                        "httpauth!" => \$config{httpauth},
                        "userdir=s" => \$config{userdir},
+                       "htmlext=s" => \$config{htmlext},
                        "exclude=s@" => sub {
                                push @{$config{wiki_file_prune_regexps}}, $_[1];
                        },
                        "exclude=s@" => sub {
                                push @{$config{wiki_file_prune_regexps}}, $_[1];
                        },