Justin Mayer 3bb900dc15 Deprecate feed_summary plugin. Closes #926 hace 7 años
..
Readme.md 3bb900dc15 Deprecate feed_summary plugin. Closes #926 hace 7 años
__init__.py 2a564dce1a Added feed summary plugin. hace 11 años
feed_summary.py 2a564dce1a Added feed summary plugin. hace 11 años
magic_set.py 6f125570b3 Fix feed_summary plugin for python3. hace 10 años

Readme.md

DEPRECATED — Do Not Use

As noted in the Pelican 3.7 release notes, RSS feeds now provide summaries by default, so this plugin is no longer relevant and will eventually be removed from this repository.


This plugin allows article summaries to be used in ATOM and RSS feeds instead of the entire article. It uses the built-in pelican Summary: metadata.

The summary of an article can either be set explicitly with the Summary: metadata attribute as described in the Pelican documentation (Writing content > File metadata section), or automatically generated using the number of words specified in the SUMMARY_MAX_LENGTH setting.

Usage

To use this plugin, ensure the following are set in your pelicanconf.py file:

PLUGIN_PATH = '/path/to/pelican-plugins'
PLUGINS = [
    'feed_summary',
    ]
FEED_USE_SUMMARY = True

The default value of FEED_USE_SUMMARY is False, so it must be set to True to enable the plugin, even if it is loaded.

This plugin is written for pelican 3.3 and later.

Implementation Notes

This plugin derives FeedSummaryWriter from the Writer class, duplicating code of the Writer._add_item_to_the_feed method.

When the initialized signal is sent, it alternates the get_writer method of the Pelican object to use FeedSummaryWriter instead of Writer.

A little hackish, but currently this can't be done otherwise via the regular plugin methods.

  • Initial Code (PR #36): Michelle L. Gill michelle.lynn.gill@gmail.com
  • Resumption of PR and Maintainer: Florian Jacob ( projects[PLUS]pelican[ÄT]florianjacob.de )