X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/65486cd75144b8400870604c6f809d7f6b6fd615..b6774bc6afac48e2c0a122647edc1485e7174a6e:/doc/todo/feed_enhancements_for_inline_pages.mdwn diff --git a/doc/todo/feed_enhancements_for_inline_pages.mdwn b/doc/todo/feed_enhancements_for_inline_pages.mdwn index 04099ec42..f13213dc2 100644 --- a/doc/todo/feed_enhancements_for_inline_pages.mdwn +++ b/doc/todo/feed_enhancements_for_inline_pages.mdwn @@ -1,38 +1,132 @@ -[[!template id=gitbranch branch=GiuseppeBilotta/inlinestuff author="Giuseppe Bilotta"]] +[[!template id=gitbranch branch=GiuseppeBilotta/inlinestuff author="[[GiuseppeBilotta]]"]] -A few patches to clean up and improve feed management for inline pages. +I rearranged my patchset once again, to clearly identify the origin and +motivation of each patch, which is explained in the following. -* 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 +In my ikiwiki-based website I have the following situation: - > Ok, but blogform.tmpl has the same problem. And either change can need - > CSS changes. (blogform in particular is used in style.css as an id.) - > So this needs more documentation and associated work. --[[Joey]] +* `$config{usedirs}` is 1 +* there are a number of subdirectories (A/, B/, C/, etc) + with pages under each of them (A/page1, A/page2, B/page3, etc) +* 'index pages' for each subdirectory: A.mdwn, B.mdwn, C.mdwn; + these are rather barebone, only contain an inline directive for their + respective subpages and become A/index.html, etc +* there is also the main index.mdwn, which inlines A.mdwn, B.mdwn, C.mdwn, + etc (i.e. the top-level index files are also inlined on the homepage) -* 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 +With the upstream `inline` plugin, the feeds for A, B, C etc are located +in `A/index.atom`, `B/index.atom`, etc; their title is the wiki name and +their main link goes to the wiki homepage rather than to their +respective subdir (e.g. I would expect `A/index.atom` to have a link to +`http://website/A` but it actually points to `http://website/`). - > I don't really like using "wikiname/page" as the name of the feed. It's - > a bit too mechanical. I'd be ok with using just the page name, - > with a fallback to wikiname for the toplevel index. Or maybe - > something like "$wikiname's $page". - > - > Also, shouldn't `pagetitle` be run on the page name? (Haven't checked.) - > --[[Joey]] +This is due to them being generated from the main index page, and is +fixed by the first patch: âinline: base feed urls on included page +nameâ. As explained in the commit message for the patch itself, this is +a âforgotten partâ from a previous page vs destpage fix which has +already been included upstream. -* the 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 +> Applied. --[[Joey]] - > Seems reasonable. Cherry-picked. Note that the title attribute - > will be shown by browsers as a tooltip. So I made it say - > "$name (RSS feed)" +>> Thanks. -* the 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 +The second patch, âinline: improve feed title and description +managementâ, aligns feed title and description management by introducing +a `title` option to complement `description`, and by basing the +description on the page description if the entry is missing. If no +description is provided by either the directive parameter or the page +metadata, we use a user-configurable default based on both the page +title and wiki name rather than hard-coding the wiki name as description. - > Hmm. This doesn't affect the feed links in the blogform.tmpl. Anyway, - > this is not something I see a real benefit of making configurable above - > the template editing level. I don't see any point whatsoever of - > allowing to turn off the feed links in the `
` -- they are not - > user-visible, and IIRC that is the recommended and most portable way - > to encode the information for feed discovery agents (rather than - > putting it in the body). And the sorry state of "modern" browsers, - > such as chromium's support for RSS means that it still makes sense to - > have user-visible feed buttons. If that changed, it would make sense to - > modify ikiwiki to globally remove them. --[[Joey]] +> Reviewing, this seems ok, but I don't like that +> `feed_desc_fmt` is "safe => 0". And I question if that needs +> to be configurable at all. I say, drop that configurable, and +> only use the page meta description (or wikiname for index). +> +> Oh, and could you indent your `elsif` the same as I? --[[Joey]] + +>> I hadn't even realized that I was nesting ifs inside else clauses, +>> sorry. I think you're also right about the safety of the key, after +>> all it only gets interpolated with known, safe strings. + +>>> I did not mean to imply that I thought it safe. --[[Joey]] + +>>>> Sorry for assuming you implied that. I do think it is safe, though +>>>> (I defaulted to not safe just to err on the safe side). + +>> The question is what to do for pages that do not have a description +>> (and are not the index). With your proposal, the Atom feed subtitle +>> would turn up empty. We could make it conditional in the default +>> template, or we could have `$desc` default to `$title` if nothing +>> else is provided, but at this point I see no reason to _not_ allow +>> the user to choose a way to build a default description. + +>>> RSS requires the `