]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/feed_enhancements_for_inline_pages.mdwn
review remaining patches
[ikiwiki.git] / doc / todo / feed_enhancements_for_inline_pages.mdwn
1 [[!template id=gitbranch branch=GiuseppeBilotta/inlinestuff author="Giuseppe Bilotta"]]
2
3 A few patches to clean up and improve feed management for inline pages.
4
5 * the first patch simply replaces the id attribute in the default template for feedlinks with a class attribute by the same name. This is necessary in pages with multiple inlines to guarantee correctness
6
7   > Ok, but blogform.tmpl has the same problem. And either change can need
8   > CSS changes. (blogform in particular is used in style.css as an id.)
9   > So this needs more documentation and associated work. --[[Joey]]
10
11   >> I didn't include blogform in the change because the case of two
12   >> blog post forms in the same page is probably extremely rare. But
13   >> then again I remember doing having them in one of my ikiwiki
14   >> draftings, so I rewrote the patch to include blogform. I had
15   >> checked the distributed CSS for #feedlinks references, without
16   >> finding any. The new patch does include CSS changes for the
17   >> \#blogform -> .blogform change. I have no idea on where to document
18   >> this change though.
19
20   >>> Picked. NEWSed. --[[Joey]]
21
22 * the second patch tries to define the default description for a feed based not only on the wiki name, but also on the current page name. The actual way this is built might not be the optimal one, so I'm open to suggestions
23
24   > I don't really like using "wikiname/page" as the name of the feed. It's
25   > a bit too mechanical. I'd be ok with using just the page name,
26   > with a fallback to wikiname for the toplevel index. Or maybe
27   > something like "$wikiname's $page".
28   > 
29   > Also, shouldn't `pagetitle` be run on the page name? (Haven't checked.)
30   > --[[Joey]] 
31
32   >> The rewritten patch now sets the feed title using the page title, and the feed description
33   >> using the page _description_, both obtained from meta if possible. If there is no page
34   >> description, then we use the page title combined with the wiki name. I introduce a new
35   >> configuration key to customize the actual automatic description.
36
37   >>> The feed title part of this seems unnecessary. As far as I can see,
38   >>> ikiwiki already uses the page title as the feed title; TITLE in the
39   >>> rsspage.tmpl is handled the same as TITLE in page.tmpl. --[[Joey]]
40
41 * the (former) third patch passes the feed titles to the templates, changing the default templates to use these as title attributes for the links. a rel="alternate" attribute is also included
42
43   > Seems reasonable. Cherry-picked. Note that the title attribute
44   > will be shown by browsers as a tooltip. So I made it say 
45   > "$name (RSS feed)"
46
47   >> Good, thanks.
48
49 * the (new) third patch passes uses the included rather than the including page for the URL. This is
50   actually a forgotten piece from my previous patch (now upstream) to base the feed name on the
51   included rather than the including page, and it's only relevant for nested inline pages.
52
53   > I have a vague memory of considering doing this before, and not,
54   > because there is actually no guarantee that the inlined page (that
55   > itself contains an inline) will generate an url. It could be excluded;
56   > it could be an internal page; it could use a conditional to omit the
57   > inline when not inlined.
58   > 
59   > Also, I think that `destpage` gets set wrong. And I think that
60   > `get_inline_content` is called with the source page, rather than the
61   > destpage, and so could generate urls that don't work on the destpage.
62   >
63   > All in all, this is an edge case, and currently seems to work ok, so
64   > why change it? --[[Joey]] 
65
66 * the (former) fourth patch introduces a feedlinks parameter to the inline directive, to allow for the specifications of the locations where the feed links should appear. Currently, two options are allowed (head and body), plus both and none with obvious significance
67
68   > Hmm. This doesn't affect the feed links in the blogform.tmpl. Anyway,
69   > this is not something I see a real benefit of making configurable above
70   > the template editing level. I don't see any point whatsoever of
71   > allowing to turn off the feed links in the `<head>` -- they are not
72   > user-visible, and IIRC that is the recommended and most portable way
73   > to encode the information for feed discovery agents (rather than
74   > putting it in the body). And the sorry state of "modern" browsers, 
75   > such as chromium's support for RSS means that it still makes sense to 
76   > have user-visible feed buttons. If that changed, it would make sense to
77   > modify ikiwiki to globally remove them. --[[Joey]]
78
79   >> I was actually quite surprised myself by the lack of automatic feed
80   >> discovery in chromium (although I noticed there's a sort-of
81   >> official plugin to do it). Overall, I believe your critique is
82   >> well-founded, I'll scratch this patch.
83
84 * the (new) fourth patch introduces a `feedtitle` parameter to override the feed title. I opted for
85   not squashing it with the second patch to allow you to scrap this but sitll get the other, in case
86   you're not too happy about having a plethora of parameters
87
88   > This seems clearly a good idea, since there is already a "description"
89   > parameter. But, by analogy with that parameter, it should just be
90   > called "title". --[[Joey]] 
91
92 * a fifth patch introduces an `id` parameter to allow setting the HTML id attribute in the
93   blogpost/feedlinks template. Since we replace their id with a class (first patch), this brings
94   back the possibility for direct CSS customization and JavaScript manipulation based on id.
95
96   > That sort of makes sense, but it somehow seems wrong that "id" should
97   > apply to only cruft at the top of the inline, and not the entire div
98   > generated for it. --[[Joey]] 
99
100 * 30a4de2aa3ab29dd9397c2edd91676e80bc06feb "urlto: prevent // when {url} ends with /"
101
102   > The `url` in the setup file should not end in a slash. Probably more
103   > things get ugly doubled slashes if someone does that. --[[Joey]] 
104
105 * 57a9b5c4affda9e855f09a64747e5225d6254079 "inline: use urlto instead of manually building the RSS url"
106
107   > Well, that seems ok. 3 parameter urlto should give us an absolute url.
108   > 
109   > But we have to be careful and verify that it will always produce
110   > exactly the same url as before. Changing the feed url unnecessarily
111   > can probably flood aggregators or something... --[[Joey]]