summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki.pm10
-rw-r--r--debian/changelog2
-rw-r--r--docwiki.setup1
3 files changed, 13 insertions, 0 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 9b7baa0ee..c01c59ac6 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -198,6 +198,13 @@ sub getsetup () { #{{{
safe => 0, # changing requires manual transition
rebuild => 1,
},
+ indexpages => {
+ type => "boolean",
+ defualt => 0,
+ description => "use page/index.mdwn source files",
+ safe => 1,
+ rebuild => 1,
+ },
discussion => {
type => "boolean",
default => 1,
@@ -619,6 +626,9 @@ sub pagename ($) { #{{{
my $type=pagetype($file);
my $page=$file;
$page=~s/\Q.$type\E*$// if defined $type && !$hooks{htmlize}{$type}{keepextension};
+ if ($config{indexpages} && $page=~/(.*)\/index$/) {
+ $page=$1;
+ }
return $page;
} #}}}
diff --git a/debian/changelog b/debian/changelog
index 394eba26a..d68f57e4d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -25,6 +25,8 @@ ikiwiki (2.66) UNRELEASED; urgency=low
page, and is preserved across rebuilds.
* editpage: Be more aggressive (and less buggy) about cleaning up
temporary files rendered during page preview.
+ * Add an indexpages option, which causes foo/index.mdwn to be the source
+ for page foo when foo.mdwn doesn't exist. Closes: #474611
-- Joey Hess <joeyh@debian.org> Thu, 25 Sep 2008 13:45:55 -0400
diff --git a/docwiki.setup b/docwiki.setup
index 6d732fd6b..cd8ba5760 100644
--- a/docwiki.setup
+++ b/docwiki.setup
@@ -14,6 +14,7 @@ use IkiWiki::Setup::Standard {
syslog => 0,
userdir => "users",
usedirs => 0,
+ indexpages => 1,
prefix_directives => 1,
add_plugins => [qw{goodstuff version haiku polygen fortune}],
}