X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/959d5b197d842e494076034f89d7bca84e531a45..9e7dcefd7ed9424de20706f63c7bab5182c5df78:/doc/todo/allow_plugins_to_add_sorting_methods.mdwn diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index f37a0758e..67d85f6f8 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -50,6 +50,21 @@ NIH'd sorting mechanisms: >>> share the `IkiWiki::PageSpec` package, but with a `cmp_` prefix. Gitweb: >>> +>>>> I agree it seems more elegant, so I have focused on it. +>>>> +>>>> I don't know about reusing `IkiWiki::PageSpec` for this. +>>>> +>>>> I would be inclined to drop the `check_` stuff. +>>>> +>>>> Wouldn't it make sense to have `meta(title)` instead +>>>> of `meta_title`? +>>>> +>>>> As I read the regexp in `cmpspec_translate`, the "command" +>>>> is required to have params. They should be optional, +>>>> to match the documentation and because most sort methods +>>>> do not need parameters. +>>>> --[[Joey]] + ## Documentation from sort-hooks branch ### sort hook (added to [[plugins/write]]) @@ -89,6 +104,9 @@ and to sort by an arbitrary `meta` value, you could use: or `\[[!meta title="foo"]]` [[ikiwiki/directive]], or the page name if no full title was set. + > I feel it sould be clearer to call that "sortas", since "sort=" is used + > to specify a sort method in other directives. --[[Joey]] + ### Multiple sort orders (added to [[ikiwiki/pagespec/sorting]]) In addition, you can combine several sort orders and/or reverse the order of @@ -104,7 +122,7 @@ An optional `sort` parameter will be used preferentially when \[[!meta title="David Bowie" sort="Bowie, David"]] -## Documentation from sort-hooks branch +## Documentation from sort-package branch The changes to [[ikiwiki/pagespec/sorting]] are the same. The changes to [[plugins/write]] are replaced by: