inline: Support emptyfeeds=no option to skip generating empty feeds.
parent
38f5e3ba69
commit
63eb9d834e
|
@ -161,6 +161,7 @@ sub preprocess_inline (@) { #{{{
|
||||||
my $atom=(($config{atom} || $config{allowatom}) && exists $params{atom}) ? yesno($params{atom}) : $config{atom};
|
my $atom=(($config{atom} || $config{allowatom}) && exists $params{atom}) ? yesno($params{atom}) : $config{atom};
|
||||||
my $quick=exists $params{quick} ? yesno($params{quick}) : 0;
|
my $quick=exists $params{quick} ? yesno($params{quick}) : 0;
|
||||||
my $feeds=exists $params{feeds} ? yesno($params{feeds}) : !$quick;
|
my $feeds=exists $params{feeds} ? yesno($params{feeds}) : !$quick;
|
||||||
|
my $emptyfeeds=exists $params{emptyfeeds} ? yesno($params{emptyfeeds}) : 1;
|
||||||
my $feedonly=yesno($params{feedonly});
|
my $feedonly=yesno($params{feedonly});
|
||||||
if (! exists $params{show} && ! $archive) {
|
if (! exists $params{show} && ! $archive) {
|
||||||
$params{show}=10;
|
$params{show}=10;
|
||||||
|
@ -289,8 +290,13 @@ sub preprocess_inline (@) { #{{{
|
||||||
gettext("Add a new post titled:"));
|
gettext("Add a new post titled:"));
|
||||||
}
|
}
|
||||||
$ret.=$formtemplate->output;
|
$ret.=$formtemplate->output;
|
||||||
|
|
||||||
|
# The post form includes the feed buttons, so
|
||||||
|
# emptyfeeds cannot be hidden.
|
||||||
|
$emptyfeeds=1;
|
||||||
}
|
}
|
||||||
elsif ($feeds && !$params{preview}) {
|
elsif ($feeds && !$params{preview} &&
|
||||||
|
! (! $emptyfeeds && ! @feedlist)) {
|
||||||
# Add feed buttons.
|
# Add feed buttons.
|
||||||
my $linktemplate=template("feedlink.tmpl", blind_cache => 1);
|
my $linktemplate=template("feedlink.tmpl", blind_cache => 1);
|
||||||
$linktemplate->param(rssurl => $rssurl) if $rss;
|
$linktemplate->param(rssurl => $rssurl) if $rss;
|
||||||
|
@ -367,7 +373,7 @@ sub preprocess_inline (@) { #{{{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($feeds) {
|
if ($feeds && ! (! $emptyfeeds && ! @feedlist)) {
|
||||||
if ($rss) {
|
if ($rss) {
|
||||||
my $rssp=rsspage($params{destpage}).$feednum;
|
my $rssp=rsspage($params{destpage}).$feednum;
|
||||||
will_render($params{destpage}, $rssp);
|
will_render($params{destpage}, $rssp);
|
||||||
|
|
|
@ -10,6 +10,7 @@ ikiwiki (2.71) UNRELEASED; urgency=low
|
||||||
* Fix handling of wrappergroup option.
|
* Fix handling of wrappergroup option.
|
||||||
* Correct --dumpsetup to include the srcdir in the setup file.
|
* Correct --dumpsetup to include the srcdir in the setup file.
|
||||||
* German translation update from Kai Wasserbäch. Closes: #507056
|
* German translation update from Kai Wasserbäch. Closes: #507056
|
||||||
|
* inline: Support emptyfeeds=no option to skip generating empty feeds.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Mon, 17 Nov 2008 14:02:10 -0500
|
-- Joey Hess <joeyh@debian.org> Mon, 17 Nov 2008 14:02:10 -0500
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,8 @@ Here are some less often needed parameters:
|
||||||
configured to `allowatom`, set to "yes" to enable.
|
configured to `allowatom`, set to "yes" to enable.
|
||||||
* `feeds` - controls generation of all types of feeds. Set to "no" to
|
* `feeds` - controls generation of all types of feeds. Set to "no" to
|
||||||
disable generating any feeds.
|
disable generating any feeds.
|
||||||
|
* `emptyfeeds` - Set to "no" to disable generation of empty feeds.
|
||||||
|
Has no effect if `rootpage` or `postform` is set.
|
||||||
* `template` - Specifies the template to fill out to display each inlined
|
* `template` - Specifies the template to fill out to display each inlined
|
||||||
page. By default the `inlinepage` template is used, while
|
page. By default the `inlinepage` template is used, while
|
||||||
the `archivepage` template is used for archives. Set this parameter to
|
the `archivepage` template is used for archives. Set this parameter to
|
||||||
|
@ -97,7 +99,7 @@ Here are some less often needed parameters:
|
||||||
in the blog. The format string is passed to the strftime(3) function.
|
in the blog. The format string is passed to the strftime(3) function.
|
||||||
* `feedpages` - A [[PageSpec]] of inlined pages to include in the rss/atom
|
* `feedpages` - A [[PageSpec]] of inlined pages to include in the rss/atom
|
||||||
feeds. The default is the same as the `pages` value above, and only pages
|
feeds. The default is the same as the `pages` value above, and only pages
|
||||||
matches by that value are included, but some of those can be excluded by
|
matched by that value are included, but some of those can be excluded by
|
||||||
specifying a tighter [[PageSpec]] here.
|
specifying a tighter [[PageSpec]] here.
|
||||||
* `guid` - If a URI is given here (perhaps a UUID prefixed with `urn:uuid:`),
|
* `guid` - If a URI is given here (perhaps a UUID prefixed with `urn:uuid:`),
|
||||||
the Atom feed will have this as its `<id>`. The default is to use the URL
|
the Atom feed will have this as its `<id>`. The default is to use the URL
|
||||||
|
|
|
@ -2,3 +2,6 @@
|
||||||
drop the rss/atom buttons for comments when there are none yet
|
drop the rss/atom buttons for comments when there are none yet
|
||||||
|
|
||||||
This seems to me like something that applies to the [[plugins/inline]] plugin in general, rather than the [[plugins/contrib/comments]] plugin specifically. --[[smcv]]
|
This seems to me like something that applies to the [[plugins/inline]] plugin in general, rather than the [[plugins/contrib/comments]] plugin specifically. --[[smcv]]
|
||||||
|
|
||||||
|
>> [[done]] as emptyfeeds option, not on by default for inline, but I think
|
||||||
|
>> it should be for comments --[[Joey]]
|
||||||
|
|
Loading…
Reference in New Issue