]> sipb.mit.edu Git - ikiwiki.git/commitdiff
revert broken parentlinks fix, which was broken, explain why
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Tue, 22 Aug 2006 17:54:10 +0000 (17:54 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Tue, 22 Aug 2006 17:54:10 +0000 (17:54 +0000)
add plugins/contrib page to avoid broken link on this wiki

IkiWiki/Render.pm
debian/changelog
doc/bugs/broken_parentlinks.mdwn
doc/plugins.mdwn
doc/plugins/contrib.mdwn [new file with mode: 0644]
templates/page.tmpl

index c3736ecb1bac0c98b3c88ed47747352a1e775329..ddd14692230a749b0cee57b6396279e4f236e9bd 100644 (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;
index e1fa4b859b65aae7010d6cd632003a44c4cf17c8..825b7a6ff24db977f749b773208793750a4e317e 100644 (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)
index 359f026ba55c028b1fa538234cffead4654c8a78..a58ff6ffee64b2dffa8c52cd9c09dc5629ab3d30 100644 (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..
index efcf65a7ddf6b51d67268fc626c1375598844ad0..86be637e65cb544d0aab801c4df0e119a9ff7348 100644 (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
 
diff --git a/doc/plugins/contrib.mdwn b/doc/plugins/contrib.mdwn
new file mode 100644 (file)
index 0000000..939d7da
--- /dev/null
@@ -0,0 +1,3 @@
+Contributed [[plugins]]:
+
+[[inline pages="plugins/contrib/* !*/Discussion" archive="yes" rootpage="contrib" show="60"]]
index 21746f332ced365710392fad810d13488a3c8cbf..438fbc25d04bbcb63c12f13c59885912ebe5acf0 100644 (file)
 <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>