]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/feed_enhancements_for_inline_pages.mdwn
review other 2
[ikiwiki.git] / doc / todo / feed_enhancements_for_inline_pages.mdwn
1 [[!template id=gitbranch branch=GiuseppeBilotta/inlinestuff author="Giuseppe Bilotta"]]
2
3 I rearranged my patchset once again, to clearly identify the origin and
4 motivation of each patch, which is explained in the following.
5
6 In my ikiwiki-based website I have the following situation:
7
8 * `$config{usedirs}` is 1
9 * there are a number of subdirectories (A/, B/, C/, etc)
10   with pages under each of them (A/page1, A/page2, B/page3, etc)
11 * 'index pages' for each subdirectory: A.mdwn, B.mdwn, C.mdwn;
12   these are rather barebone, only contain an inline directive for their
13   respective subpages and become A/index.html, etc
14 * there is also the main index.mdwn, which inlines A.mdwn, B.mdwn, C.mdwn,
15   etc (i.e. the top-level index files are also inlined on the homepage)
16
17 With the upstream `inline` plugin, the feeds for A, B, C etc are located
18 in `A/index.atom`, `B/index.atom`, etc; their title is the wiki name and
19 their main link goes to the wiki homepage rather than to their
20 respective subdir (e.g. I would expect `A/index.atom` to have a link to
21 `http://website/A` but it actually points to `http://website/`).
22
23 This is due to them being generated from the main index page, and is
24 fixed by the first patch: ‘inline: base feed urls on included page
25 name’. As explained in the commit message for the patch itself, this is
26 a ‘forgotten part’ from a previous page vs destpage fix which has
27 already been included upstream.
28
29 > Applied. --[[Joey]] 
30
31 The second patch, ‘inline: improve feed title and description
32 management’, aligns feed title and description management by introducing
33 a `title` option to complement `description`, and by basing the
34 description on the page description if the entry is missing. If no
35 description is provided by either the directive parameter or the page
36 metadata, we use a user-configurable default based on both the page
37 title and wiki name rather than hard-coding the wiki name as description.
38
39 > Reviewing, this seems ok, but I don't like that 
40 > `feed_desc_fmt` is "safe => 0". And I question if that needs
41 > to be configurable at all. I say, drop that configurable, and
42 > only use the page meta description (or wikiname for index).
43
44 > Oh, and could you indent your `elsif` the same as I? --[[Joey]] 
45
46 The third patch, ‘inline: allow assigning an id to postform/feedlink’,
47 does just that. I don't currently use it, but it can be particularly
48 useful in the postform case for example for scriptable management of
49 multiple postforms in the same page.
50
51 > Applied. --[[Joey]] 
52
53 In one of my wiki setups I had a terminating '/' in `$config{url}`. You
54 mention that it should not be present, but I have not seen this
55 requirement described anywhere. Rather than restricting the user input,
56 I propose a patch that prevents double slashes from appearing in links
57 created by `urlto()` by fixing the routine itself.
58
59 > If this is fixed I would rather not put the overhead of fixing it in
60 > every call to `urlto`. And I'm not sure this is a comprehensive
61 > fix to every problem a trailing slash in the url could cause. --[[Joey]]
62
63 The inline plugin is also updated (in a separate patch) to use `urlto()`
64 rather than hand-coding the feed urls. You might want to keep this
65 change even if you discard the urlto patch.
66
67 > IIRC, I was missing a proof that this always resulted in identical urls,
68 > which is necessary to prevent flooding. I need such a proof before I can
69 > apply that. --[[Joey]]