revert broken parentlinks fix, which was broken, explain why

add plugins/contrib page to avoid broken link on this wiki
master
joey 2006-08-22 17:54:10 +00:00
parent 467d5b5e2a
commit 43f2ba5def
6 changed files with 20 additions and 9 deletions

View File

@ -74,7 +74,7 @@ sub parentlinks ($) { #{{{
foreach my $dir (reverse split("/", $page)) {
if (! $skip) {
$path.="../";
unshift @ret, { url => exists $pagesources{$dir} ? $path.htmlpage($dir) : "", page => pagetitle($dir) };
unshift @ret, { url => $path.htmlpage($dir), page => pagetitle($dir) };
}
else {
$skip=0;

2
debian/changelog vendored
View File

@ -1,7 +1,5 @@
ikiwiki (1.22) UNRELEASED; urgency=low
* Fixed a bug with previews of subpages having broken links to top-level
pages.
* Change how the stylesheet url is determined in the templates: Remove
STYLEURL and add BASEURL to all templates (some already had it). This
new more general variable can be used to link to other things (eg, images)

View File

@ -6,4 +6,18 @@ For example, if you are in 'example/page.html', the header will be something
like 'wiki / example / page'. Now, if 'example.html' doesn't exist, you'll have
a dead link for every subpage.
[[todo/done]]
---
This is a bug, but fixing it is very tricky. Consider what would happen if
example.mdwn were created: example/page.html and the rest of example/*
would need to be updated to change the parentlink from a bare work to a
link to the new page. Now if example.mdwn were removed again, they'd need
to be updated again. So example/* depends on example. But it's even more
tricky, because if example.mdwn is modified, we _don't_ want to rebuild
example/*!
ikiwiki doesn't have a way to represent this dependency and can't get one
without a lot of new complex code being added.
For now the best thing to do is to make sure that you always create
example if you create example/foo. Which is probably a good idea anyway..

View File

@ -15,7 +15,7 @@ or the equivalent `add_plugins` line in [[ikiwiki.setup]].
Add all plugins here. Or add ideas to the [[todo|todo/plugin]] page.
[[inline pages="plugins/* !plugins/type/* !plugins/write !*/Discussion" archive="yes" rootpage="plugins/contrib" show="60"]]
[[inline pages="plugins/* and !plugins/type/* and !plugins/write and !plugins/contrib and !*/Discussion" archive="yes" rootpage="plugins/contrib" show="60"]]
# Installing third party plugins

View File

@ -0,0 +1,3 @@
Contributed [[plugins]]:
[[inline pages="plugins/contrib/* !*/Discussion" archive="yes" rootpage="contrib" show="60"]]

View File

@ -14,11 +14,7 @@
<div class="header">
<span>
<TMPL_LOOP NAME="PARENTLINKS">
<TMPL_IF NAME="URL">
<a href="<TMPL_VAR NAME=URL>"><TMPL_VAR NAME=PAGE></a>/
<TMPL_ELSE>
<TMPL_VAR NAME=PAGE>/
</TMPL_IF>
</TMPL_LOOP>
<TMPL_VAR TITLE>
</span>