summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-08-22 17:54:10 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-08-22 17:54:10 +0000
commit43f2ba5def1ada506fc005b6efab3da88f74930f (patch)
tree8ed98436e45308177f8be6996740fd76246a54f7
parent467d5b5e2a10aab53ade882a378a2e2c215d798c (diff)
revert broken parentlinks fix, which was broken, explain why
add plugins/contrib page to avoid broken link on this wiki
-rw-r--r--IkiWiki/Render.pm2
-rw-r--r--debian/changelog2
-rw-r--r--doc/bugs/broken_parentlinks.mdwn16
-rw-r--r--doc/plugins.mdwn2
-rw-r--r--doc/plugins/contrib.mdwn3
-rw-r--r--templates/page.tmpl4
6 files changed, 20 insertions, 9 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index c3736ecb1..ddd146922 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -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;
diff --git a/debian/changelog b/debian/changelog
index e1fa4b859..825b7a6ff 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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)
diff --git a/doc/bugs/broken_parentlinks.mdwn b/doc/bugs/broken_parentlinks.mdwn
index 359f026ba..a58ff6ffe 100644
--- a/doc/bugs/broken_parentlinks.mdwn
+++ b/doc/bugs/broken_parentlinks.mdwn
@@ -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..
diff --git a/doc/plugins.mdwn b/doc/plugins.mdwn
index efcf65a7d..86be637e6 100644
--- a/doc/plugins.mdwn
+++ b/doc/plugins.mdwn
@@ -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
diff --git a/doc/plugins/contrib.mdwn b/doc/plugins/contrib.mdwn
new file mode 100644
index 000000000..939d7da5f
--- /dev/null
+++ b/doc/plugins/contrib.mdwn
@@ -0,0 +1,3 @@
+Contributed [[plugins]]:
+
+[[inline pages="plugins/contrib/* !*/Discussion" archive="yes" rootpage="contrib" show="60"]]
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 21746f332..438fbc25d 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -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>