aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/broken_parentlinks.mdwn
blob: 556d89b65eb0515de9ff250ed85c2649ba6382c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
The header of subpages always links to its "superpage", even if it doesn't
exist. I'm not sure if this is a feature or a bug, but I would certainly prefer
that superpages weren't mandatory.

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.

---

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 word 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.

> Note that this code has now been added. In new terms, example/* has a
> presence dependency on example. So this bug is theoretically fixable now.
> --[[Joey]] 

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..

----

Note that this bug does not exist if the wiki is built with the "usedirs"
option, since in that case, the parent link will link to a subdirectory,
that will just be missing the index.html file, but still nicely usable.
--[[Joey]] 

----

<http://www.gnu.org/software/hurd/hurd/translator/writing.html> does not exist.
Then, on
<http://www.gnu.org/software/hurd/hurd/translator/writing/example.html>, in the
*parentlinks* line, *writing* links to the top-level *index* file.  It should
rather not link anywhere at all.  --[[tschwinge]]

> So, the bug has changed behavior a bit. Rather than a broken link, we get
> a link to the toplevel page. This, FWIW, is because the template now
> uses this for each parentlink:

	<a href="<TMPL_VAR URL>"><TMPL_VAR PAGE></a>/

> Best workaround is still to enable usedirs. --[[Joey]]