From b67632cdcdd333cf0a88d03c0f7e6e62921f32c3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Dec 2008 15:01:26 -0500 Subject: inline: Support feedfile option to change the filename of the feed generated. --- doc/ikiwiki/directive/inline.mdwn | 5 +++++ doc/plugins/write.mdwn | 6 +++++- doc/todo/inline_plugin:_ability_to_override_feed_name.mdwn | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwiki/directive/inline.mdwn b/doc/ikiwiki/directive/inline.mdwn index 82b532e0c..40670e1e7 100644 --- a/doc/ikiwiki/directive/inline.mdwn +++ b/doc/ikiwiki/directive/inline.mdwn @@ -104,6 +104,11 @@ Here are some less often needed parameters: * `guid` - If a URI is given here (perhaps a UUID prefixed with `urn:uuid:`), the Atom feed will have this as its ``. The default is to use the URL of the page containing the `inline` directive. +* `feedfile` - Can be used to change the name of the file generated for the + feed. This is particularly useful if a page contains multiple feeds. + For example, set "feedfile=feed" to cause it to generate `page/feed.atom` + and/or `page/feed.rss`. This option is not supported if the wiki is + configured not to use `usedirs`. [[!meta robots="noindex, follow"]] diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index abcabbdc3..b6fa96f91 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -696,11 +696,15 @@ This can be called when creating a new page, to determine what filename to save the page to. It's passed a page name, and its type, and returns the name of the file to create, relative to the srcdir. -#### `targetpage($$)` +#### `targetpage($$;$)` Passed a page and an extension, returns the filename that page will be rendered to. +Optionally, a third parameter can be passed, to specify the preferred +filename of the page. For example, `targetpage("foo", "rss", "feed")` +will yield something like `foo/feed.rss`. + ## Miscellaneous ### Internal use pages diff --git a/doc/todo/inline_plugin:_ability_to_override_feed_name.mdwn b/doc/todo/inline_plugin:_ability_to_override_feed_name.mdwn index 71bc3bdd6..df5bf9194 100644 --- a/doc/todo/inline_plugin:_ability_to_override_feed_name.mdwn +++ b/doc/todo/inline_plugin:_ability_to_override_feed_name.mdwn @@ -25,3 +25,5 @@ could perhaps change it to `/sandbox-comments.atom` or > Particularly for the non-usedirs case, where a page `sandbox/comments` > would produce the same feed as sandbox with `feedname=comments`. > --[[Joey]] + +> [[done]] as feedfile option --[[Joey]] -- cgit v1.2.3