]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* inline: Add new `allowrss` and `allowatom` config options. These can be
authorJoey Hess <joey@kodama.kitenet.net>
Mon, 4 Feb 2008 23:36:50 +0000 (18:36 -0500)
committerJoey Hess <joey@kodama.kitenet.net>
Mon, 4 Feb 2008 23:36:50 +0000 (18:36 -0500)
  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.

IkiWiki.pm
IkiWiki/Plugin/inline.pm
debian/changelog
doc/ikiwiki.setup
doc/ikiwiki/blog.mdwn
doc/usage.mdwn

index 8172552cbe147d830d51695f5c1a2149a8274b2d..0c05bb0d377c8622b2e0ea3ff6a21abea14a6322 100644 (file)
@@ -68,6 +68,8 @@ sub defaultconfig () { #{{{
        diffurl => '',
        rss => 0,
        atom => 0,
+       allowrss => 0,
+       allowatom => 0,
        discussion => 1,
        rebuild => 0,
        refresh => 0,
index ae3f8f409d81d9ba65bc680b60f0cb167a1ecc5c..e2be5640e72ef425d49ae44901aeace7908e3409 100644 (file)
@@ -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});
index 8220e162ba2af2170a5ad7aa025832b3754a7973..b32c7ad51b58b38dcdbe09543a9676d778e30643 100644 (file)
@@ -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
 
index 059485d387c9dcd92dc8ab3da3e47604d24876b8..c96a45f78d091a23a905d82e5dfd33f3d7e27a14 100644 (file)
@@ -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?
index 6e5eec4aada473f6b10c94d2bdffec6d1e56fb75..80a3d20b396f0d418b52b3e77de7415ea357e845 100644 (file)
@@ -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]].
index f34d5bad653ba4119ca968d71a77a19be8dafbd3..cd8f0542c6a8eb3b2623b37ce2f39dfc7fdf03c1 100644 (file)
@@ -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