Description | A static content generator. |
Newcomen::Plugin::Blog::Index::Exclude - Removes articles from index pages.
This plugin may be used to remove source items from Newcomen::Collection instances. All
collections with a creator ID starting with 'Blog::Index::'
will be processed. Source instances
will be removed based an meta data. See OPTIONS for a description on what meta data will
be checked and how.
{ 'blog' => { 'index' => { 'exclude' => {}, }, }, }
These are the default options set by this plugin. They may be overridden by user configuration.
blog/index/exclude, if set, must be a hashref. Its keys specify the meta data keys of the source
items to check. Its values will be used as a pattern in a regular expression. If the configured
pattern matches the value of the source's meta data for the specified key, the source item will be
removed from all index collections. Matching is case sensitive. Nested meta data structures are
supported, the slash ('/'
) is used as a separator (e.g. published/time/year could be used to
match against the source items year).
If, for example, all source items with the meta data on_index set to 'no'
should be removed
from all index pages, the following may be used:
{ 'blog' => { 'index' => { 'exclude' => { 'on_index' => '^no$', }, }, }, }
The meta data of the Newcomen::Source instances to be checked can be configured freely, see above.
This plugin implements the hook hook_clean_collection() (default priority).
Newcomen::Collection, Newcomen::Plugin::Blog::Index::Main::Exclude, Newcomen::Source
This is version 2014052501
.
Stefan Goebel - newcomen {at} subtype {dot} de
Copyright 2013-2014 Stefan Goebel.
This file is part of Newcomen.
Newcomen is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the license, or (at your option) any later version.
Newcomen is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Newcomen. If not, see <http://www.gnu.org/licenses/>.