]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/todo/feed_enhancements_for_inline_pages.mdwn
reviewing next patch
[ikiwiki.git] / doc / todo / feed_enhancements_for_inline_pages.mdwn
index f82c304825ed64a9d97c586be1ff312b185fe1ba..4e80fdeb8fb9d1bf8d6224f98504e6a37173c13f 100644 (file)
@@ -1,73 +1,60 @@
 [[!template id=gitbranch branch=GiuseppeBilotta/inlinestuff author="Giuseppe Bilotta"]]
 
-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.
+
+In my ikiwiki-based website I have the following situation:
+
+* `$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)
+
+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/`).
+
+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.
+
+> Applied. --[[Joey]] 
+
+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.
+
+> 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]] 
+
+The third patch, ‘inline: allow assigning an id to postform/feedlink’,
+does just that. I don't currently use it, but it can be particularly
+useful in the postform case for example for scriptable management of
+multiple postforms in the same page.
+
+In one of my wiki setups I had a terminating '/' in `$config{url}`. You
+mention that it should not be present, but I have not seen this
+requirement described anywhere. Rather than restricting the user input,
+I propose a patch that prevents double slashes from appearing in links
+created by `urlto()` by fixing the routine itself.
+
+The inline plugin is also updated (in a separate patch) to use `urlto()`
+rather than hand-coding the feed urls. You might want to keep this
+change even if you discard the urlto patch.
 
-* 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
-
-  > 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]]
-
-  >> I didn't include blogform in the change because the case of two
-  >> blog post forms in the same page is probably extremely rare. But
-  >> then again I remember doing having them in one of my ikiwiki
-  >> draftings, so I rewrote the patch to include blogform. I had
-  >> checked the distributed CSS for #feedlinks references, without
-  >> finding any. The new patch does include CSS changes for the
-  >> \#blogform -> .blogform change. I have no idea on where to document
-  >> this change though.
-
-  >>> Picked. NEWSed. --[[Joey]]
-
-* 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
-
-  > 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]] 
-
-  >> The rewritten patch now sets the feed title using the page title, and the feed description
-  >> using the page _description_, both obtained from meta if possible. If there is no page
-  >> description, then we use the page title combined with the wiki name. I introduce a new
-  >> configuration key to customize the actual automatic description.
-
-* 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
-
-  > 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)"
-
-  >> Good, thanks.
-
-* the (new) third patch passes uses the included rather than the including page for the URL. This is
-  actually a forgotten piece from my previous patch (now upstream) to base the feed name on the
-  included rather than the including page, and it's only relevant for nested inline pages.
-
-* 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
-
-  > 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 `<head>` -- 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]]
-
-  >> I was actually quite surprised myself by the lack of automatic feed
-  >> discovery in chromium (although I noticed there's a sort-of
-  >> official plugin to do it). Overall, I believe your critique is
-  >> well-founded, I'll scratch this patch.
-
-* the (new) fourth patch introduces a `feedtitle` parameter to override the feed title. I opted for
-  not squashing it with the second patch to allow you to scrap this but sitll get the other, in case
-  you're not too happy about having a plethora of parameters
-
-* a fifth patch introduces an `id` parameter to allow setting the HTML id attribute in the
-  blogpost/feedlinks template. Since we replace their id with a class (first patch), this brings
-  back the possibility for direct CSS customization and JavaScript manipulation based on id.