diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-04 01:29:45 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-04 01:29:45 +0000 |
commit | f877845353e5f8cfe6d3bdad625b9c2bacee878e (patch) | |
tree | 61d1e52fd1f2725adf5115736975a43f1051ead4 | |
parent | 7b87549558a538e604c4368dc653eba11cb87bc9 (diff) |
remove leading dot from default_pageext
fix preview to not assume it's the default page type, and instead get the
type from the page
-rw-r--r-- | IkiWiki.pm | 2 | ||||
-rw-r--r-- | IkiWiki/CGI.pm | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index f8c1f9d3e..d7c082b1d 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -16,7 +16,7 @@ sub defaultconfig () { #{{{ wiki_file_regexp => qr/(^[-[:alnum:]_.:\/+]+$)/, verbose => 0, wikiname => "wiki", - default_pageext => ".mdwn", + default_pageext => "mdwn", cgi => 0, rcs => 'svn', notify => 0, diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 5e7f77171..3e4cbe4cf 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -317,10 +317,13 @@ sub cgi_editpage ($$) { #{{{ } $page=lc($page); - my $file=$page.$config{default_pageext}; + my $file; if (exists $pagesources{lc($page)}) { $file=$pagesources{lc($page)}; } + else { + $file=$page.".".$config{default_pageext}; + } my $newfile=0; if (! -e "$config{srcdir}/$file") { $newfile=1; @@ -360,7 +363,7 @@ sub cgi_editpage ($$) { #{{{ $form->field(name => "comments", value => $comments, force => 1); $form->tmpl_param("page_preview", - htmlize($config{default_pageext}, + htmlize(pagetype($file), linkify($page, $page, $content))); } else { |