Description | A static content generator. |
Newcomen::Plugin::Blog::Index::Main::Exclude - Removes articles from the main index page.
This plugin may be used to remove source items from the main index Newcomen::Collection instance,
i.e. the collection with the creator ID 'Blog::Index::Main'
. Source instances will be removed
based an meta data. See OPTIONS for a description on what meta data will be checked and
how. This plugin works like the Newcomen::Plugin::Blog::Index::Exclude plugin, but only affects
the main index page, not the list index pages.
{ 'blog' => { 'index' => { 'main' => { 'exclude' => {}, }, }, }, }
These are the default options set by this plugin. They may be overridden by user configuration.
blog/index/main/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 the main index collection. 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 main_index set to 'no'
should be removed
from the index, the following may be used:
{ 'blog' => { 'index' => { 'main' => 'exclude' => { 'main_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::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/>.