diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-02-04 18:36:50 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-02-04 18:36:50 -0500 |
commit | bf522a347f9749522a4f575cb48000123b79978a (patch) | |
tree | bf3502292e72a9767da7a1661a433b6668e415e0 | |
parent | f7c575bd30b2b4a66ca73dedec1984872fdf8372 (diff) |
* inline: Add new `allowrss` and `allowatom` config options. These can be
used if you want a wiki that doesn't default to generating rss or atom
feeds, but that does allow them to be turned on for specific blogs.
-rw-r--r-- | IkiWiki.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Plugin/inline.pm | 6 | ||||
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | doc/ikiwiki.setup | 11 | ||||
-rw-r--r-- | doc/ikiwiki/blog.mdwn | 10 | ||||
-rw-r--r-- | doc/usage.mdwn | 20 |
6 files changed, 38 insertions, 14 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index 8172552cb..0c05bb0d3 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -68,6 +68,8 @@ sub defaultconfig () { #{{{ diffurl => '', rss => 0, atom => 0, + allowrss => 0, + allowatom => 0, discussion => 1, rebuild => 0, refresh => 0, diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index ae3f8f409..e2be5640e 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -34,6 +34,8 @@ sub getopt () { #{{{ GetOptions( "rss!" => \$config{rss}, "atom!" => \$config{atom}, + "allowrss!" => \$config{allowrss}, + "allowatom!" => \$config{allowatom}, ); } @@ -91,8 +93,8 @@ sub preprocess_inline (@) { #{{{ } my $raw=yesno($params{raw}); my $archive=yesno($params{archive}); - my $rss=($config{rss} && exists $params{rss}) ? yesno($params{rss}) : $config{rss}; - my $atom=($config{atom} && exists $params{atom}) ? yesno($params{atom}) : $config{atom}; + my $rss=(($config{rss} || $config{allowrss}) && exists $params{rss}) ? yesno($params{rss}) : $config{rss}; + my $atom=(($config{atom} || $config{allowatom}) && exists $params{atom}) ? yesno($params{atom}) : $config{atom}; my $quick=exists $params{quick} ? yesno($params{quick}) : 0; my $feeds=exists $params{feeds} ? yesno($params{feeds}) : !$quick; my $feedonly=yesno($params{feedonly}); diff --git a/debian/changelog b/debian/changelog index 8220e162b..b32c7ad51 100644 --- a/debian/changelog +++ b/debian/changelog @@ -33,6 +33,9 @@ ikiwiki (2.31) UNRELEASED; urgency=low and if will_render isn't called its security checks will get upset when the page is saved. Thanks to Edward Betts for his help tracking this tricky bug down. + * inline: Add new `allowrss` and `allowatom` config options. These can be + used if you want a wiki that doesn't default to generating rss or atom + feeds, but that does allow them to be turned on for specific blogs. -- Joey Hess <joeyh@debian.org> Sat, 02 Feb 2008 23:36:31 -0500 diff --git a/doc/ikiwiki.setup b/doc/ikiwiki.setup index 059485d38..c96a45f78 100644 --- a/doc/ikiwiki.setup +++ b/doc/ikiwiki.setup @@ -92,10 +92,13 @@ use IkiWiki::Setup::Standard { #}, ], - # Generate rss feeds for blogs? - rss => 1, - # Generate atom feeds for blogs? - atom => 1, + # Default to generating rss feeds for blogs? + #rss => 1, + # Default to generating atom feeds for blogs? + #atom => 1, + # Allow generating feeds even if not generated by default? + #allowrss => 1, + #allowatom => 1, # Urls to ping with XML-RPC when rss feeds are updated #pingurl => [qw{http://rpc.technorati.com/rpc/ping}], # Include discussion links on all pages? diff --git a/doc/ikiwiki/blog.mdwn b/doc/ikiwiki/blog.mdwn index 6e5eec4aa..80a3d20b3 100644 --- a/doc/ikiwiki/blog.mdwn +++ b/doc/ikiwiki/blog.mdwn @@ -52,10 +52,12 @@ directive: Set to 0 to show all matching pages. * `skip` - Specify a number of pages to skip displaying. Can be useful to produce a feed that only shows archived pages. -* `rss` - controls generation of an rss feed. On by default if the wiki is - configured to use rss feeds, set to "no" to disable. -* `atom` - controls generation of an atom feed. On by default if the wiki is - configured to use atom feeds, set to "no" to disable. +* `rss` - controls generation of an rss feed. If the wiki is configured to + generate tss feeds by default, set to "no" to disable. If the wiki is + configured to `allowrss`, set to "yes" to enable. +* `atom` - controls generation of an atom feed. If the wiki is configured to + generate atom feeds by default, set to "no" to disable. If the wiki is + configured to `allowatom`, set to "yes" to enable. * `feeds` - controls generation of all types of feeds. Set to "no" to disable generating any feeds. * `postform` - Set to "yes" to enables a form to post new pages to a [[blog]]. diff --git a/doc/usage.mdwn b/doc/usage.mdwn index f34d5bad6..cd8f0542c 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -153,13 +153,25 @@ configuration options of their own. * --rss, --norss - If rss is set, ikiwiki will generate RSS feeds for pages that inline - a [[ikiwiki/blog]]. + If rss is set, ikiwiki will default to generating RSS feeds for pages + that inline a [[ikiwiki/blog]]. + +* --allowrss + + If allowrss is set, and rss is not set, ikiwiki will not default to + generating RSS feeds, but setting `rss=yes` in the blog can override + this default and generate a feed. * --atom, --noatom - If atom is set, ikiwiki will generate Atom feeds for pages that inline - a [[ikiwiki/blog]]. + If atom is set, ikiwiki will default to generating Atom feeds for pages + that inline a [[ikiwiki/blog]]. + +* --allowatom + + If allowatom is set, and rss is not set, ikiwiki will not default to + generating Atom feeds, but setting `atom=yes` in the blog can override + this default and generate a feed. * --pingurl URL |