aboutsummaryrefslogtreecommitdiff
path: root/doc/todo/Post-compilation_inclusion_of_the_sidebar.mdwn
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-04-22 16:12:54 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-04-22 16:12:54 -0400
commit86d6b40070023409882a5768a4db899e523bba71 (patch)
tree82ce1b980a6cd5397f1587c2fc36440e20dd33dd /doc/todo/Post-compilation_inclusion_of_the_sidebar.mdwn
parent5e1b3c0c363f4da91413b11905cce3a6d9af7abd (diff)
downloadikiwiki-86d6b40070023409882a5768a4db899e523bba71.tar
ikiwiki-86d6b40070023409882a5768a4db899e523bba71.tar.gz
two problems
Diffstat (limited to 'doc/todo/Post-compilation_inclusion_of_the_sidebar.mdwn')
-rw-r--r--doc/todo/Post-compilation_inclusion_of_the_sidebar.mdwn27
1 files changed, 22 insertions, 5 deletions
diff --git a/doc/todo/Post-compilation_inclusion_of_the_sidebar.mdwn b/doc/todo/Post-compilation_inclusion_of_the_sidebar.mdwn
index 568b75747..36161e8b4 100644
--- a/doc/todo/Post-compilation_inclusion_of_the_sidebar.mdwn
+++ b/doc/todo/Post-compilation_inclusion_of_the_sidebar.mdwn
@@ -43,8 +43,25 @@ NicolasLimare
> could just be dumped into the page by the pagetemplate hook. Current code
> re-loads and renders the same sidebar file for every page built!
>
-> The sticky part is relative links on the sidebar. These would need to
-> be modified somehow depending on the page that the sidebar is placed on.
-> Doing that seems hard/tricky. Maybe it would not be worth the optimisation
-> of using the stored rendering after all, and instead still re-render it for
-> each page? --[[Joey]]
+> The sticky part is (relative) links on the sidebar. These would need to
+> be modified somehow depending on the page that the sidebar is placed on,
+> to not break the link.
+>
+> Another wrinkle is changing subpage links on a sidebar. Suppose a sidebar
+> links to page `foo`. If page `bar/foo` exists, the sidebar on page bar will,
+> currently, link to that page, in preference to a toplevel `foo`.
+> If `bar/foo` is removed, it will update to link to `foo`. With the new
+> scheme, the stored sidebar rendering is not for page `foo`, and so
+> the change of the `bar/foo` link will not be noticed or acted on.
+> Granted, it's unlikely that anyone relies on the current behavior. You
+> generally want links on a sidebar to link to the same place on every page
+> that displays it. So finding some way to force all links on a sidebar to
+> be handled absolutely and documenting that would avoid this problem.
+>
+> So, one way to handle both the above problems would be to use the
+> pre-rendered sidebar for each page, but use a html parser to look for
+> links in it, and munge them to work as relative links on the page the
+> sidebar is being added to. Or, if the wiki's url is known, just do this
+> once when rendering the sidebar, adding the full url to the links.
+> (Maybe require `url` be set when using sidebar?)
+> --[[Joey]]