forked from github/pelican
Merge branch 'master' into line-limit
This commit is contained in:
commit
e35120faa8
11 changed files with 165 additions and 109 deletions
1
THANKS
1
THANKS
|
|
@ -155,6 +155,7 @@ Tshepang Lekhonkhobe
|
||||||
Valentin-Costel Hăloiu
|
Valentin-Costel Hăloiu
|
||||||
Vlad Niculae
|
Vlad Niculae
|
||||||
William Light
|
William Light
|
||||||
|
William Minchin
|
||||||
Wladislaw Merezhko
|
Wladislaw Merezhko
|
||||||
W. Trevor King
|
W. Trevor King
|
||||||
Zoresvit
|
Zoresvit
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,9 @@ Release history
|
||||||
Next release
|
Next release
|
||||||
============
|
============
|
||||||
|
|
||||||
|
* All settings for slugs now use ``{slug}`` and/or ``{lang}`` rather than
|
||||||
|
``%s``. If ``%s``-style settings are encountered, Pelican will emit a warning
|
||||||
|
and fallback to the default setting.
|
||||||
* New signal: ``feed_generated``
|
* New signal: ``feed_generated``
|
||||||
* Replace Fabric by Invoke and ``fabfile.py`` template by ``tasks.py``.
|
* Replace Fabric by Invoke and ``fabfile.py`` template by ``tasks.py``.
|
||||||
* Replace ``SLUG_SUBSTITUTIONS`` (and friends) by ``SLUG_REGEX_SUBSTITUTIONS``
|
* Replace ``SLUG_SUBSTITUTIONS`` (and friends) by ``SLUG_REGEX_SUBSTITUTIONS``
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ which you map the signals to your plugin logic. Let's take a simple example::
|
||||||
from pelican import signals
|
from pelican import signals
|
||||||
|
|
||||||
def test(sender):
|
def test(sender):
|
||||||
print "%s initialized !!" % sender
|
print("{} initialized !!".format(sender))
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
signals.initialized.connect(test)
|
signals.initialized.connect(test)
|
||||||
|
|
|
||||||
|
|
@ -881,59 +881,61 @@ the ``TAG_FEED_ATOM`` and ``TAG_FEED_RSS`` settings:
|
||||||
Relative URL of the all-posts RSS feed. If not set, ``FEED_ALL_RSS`` is used
|
Relative URL of the all-posts RSS feed. If not set, ``FEED_ALL_RSS`` is used
|
||||||
both for save location and URL.
|
both for save location and URL.
|
||||||
|
|
||||||
.. data:: CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'
|
.. data:: CATEGORY_FEED_ATOM = 'feeds/{slug}.atom.xml'
|
||||||
|
|
||||||
The location to save the category Atom feeds. [2]_
|
The location to save the category Atom feeds. [2]_
|
||||||
|
|
||||||
.. data:: CATEGORY_FEED_ATOM_URL = None
|
.. data:: CATEGORY_FEED_ATOM_URL = None
|
||||||
|
|
||||||
Relative URL of the category Atom feeds, including the ``%s`` placeholder.
|
Relative URL of the category Atom feeds, including the ``{slug}``
|
||||||
[2]_ If not set, ``CATEGORY_FEED_ATOM`` is used both for save location and
|
placeholder. [2]_ If not set, ``CATEGORY_FEED_ATOM`` is used both for save
|
||||||
URL.
|
location and URL.
|
||||||
|
|
||||||
.. data:: CATEGORY_FEED_RSS = None, i.e. no RSS
|
.. data:: CATEGORY_FEED_RSS = None, i.e. no RSS
|
||||||
|
|
||||||
The location to save the category RSS feeds, including the ``%s``
|
The location to save the category RSS feeds, including the ``{slug}``
|
||||||
placeholder. [2]_
|
placeholder. [2]_
|
||||||
|
|
||||||
.. data:: CATEGORY_FEED_RSS_URL = None
|
.. data:: CATEGORY_FEED_RSS_URL = None
|
||||||
|
|
||||||
Relative URL of the category RSS feeds, including the ``%s`` placeholder.
|
Relative URL of the category RSS feeds, including the ``{slug}``
|
||||||
[2]_ If not set, ``CATEGORY_FEED_RSS`` is used both for save location and
|
placeholder. [2]_ If not set, ``CATEGORY_FEED_RSS`` is used both for save
|
||||||
URL.
|
location and URL.
|
||||||
|
|
||||||
.. data:: AUTHOR_FEED_ATOM = 'feeds/%s.atom.xml'
|
.. data:: AUTHOR_FEED_ATOM = 'feeds/{slug}.atom.xml'
|
||||||
|
|
||||||
The location to save the author Atom feeds. [2]_
|
The location to save the author Atom feeds. [2]_
|
||||||
|
|
||||||
.. data:: AUTHOR_FEED_ATOM_URL = None
|
.. data:: AUTHOR_FEED_ATOM_URL = None
|
||||||
|
|
||||||
Relative URL of the author Atom feeds, including the ``%s`` placeholder.
|
Relative URL of the author Atom feeds, including the ``{slug}`` placeholder.
|
||||||
[2]_ If not set, ``AUTHOR_FEED_ATOM`` is used both for save location and
|
[2]_ If not set, ``AUTHOR_FEED_ATOM`` is used both for save location and
|
||||||
URL.
|
URL.
|
||||||
|
|
||||||
.. data:: AUTHOR_FEED_RSS = 'feeds/%s.rss.xml'
|
.. data:: AUTHOR_FEED_RSS = 'feeds/{slug}.rss.xml'
|
||||||
|
|
||||||
The location to save the author RSS feeds. [2]_
|
The location to save the author RSS feeds. [2]_
|
||||||
|
|
||||||
.. data:: AUTHOR_FEED_RSS_URL = None
|
.. data:: AUTHOR_FEED_RSS_URL = None
|
||||||
|
|
||||||
Relative URL of the author RSS feeds, including the ``%s`` placeholder. [2]_
|
Relative URL of the author RSS feeds, including the ``{slug}`` placeholder.
|
||||||
If not set, ``AUTHOR_FEED_RSS`` is used both for save location and URL.
|
[2]_ If not set, ``AUTHOR_FEED_RSS`` is used both for save location and URL.
|
||||||
|
|
||||||
.. data:: TAG_FEED_ATOM = None, i.e. no tag feed
|
.. data:: TAG_FEED_ATOM = None, i.e. no tag feed
|
||||||
|
|
||||||
The location to save the tag Atom feed, including the ``%s`` placeholder.
|
The location to save the tag Atom feed, including the ``{slug}``
|
||||||
[2]_
|
placeholder. [2]_
|
||||||
|
|
||||||
.. data:: TAG_FEED_ATOM_URL = None
|
.. data:: TAG_FEED_ATOM_URL = None
|
||||||
|
|
||||||
Relative URL of the tag Atom feed, including the ``%s`` placeholder. [2]_
|
Relative URL of the tag Atom feed, including the ``{slug}`` placeholder.
|
||||||
|
[2]_
|
||||||
|
|
||||||
.. data:: TAG_FEED_RSS = None, i.e. no RSS tag feed
|
.. data:: TAG_FEED_RSS = None, i.e. no RSS tag feed
|
||||||
|
|
||||||
Relative URL to output the tag RSS feed, including the ``%s`` placeholder.
|
Relative URL to output the tag RSS feed, including the ``{slug}``
|
||||||
If not set, ``TAG_FEED_RSS`` is used both for save location and URL.
|
placeholder. If not set, ``TAG_FEED_RSS`` is used both for save location and
|
||||||
|
URL.
|
||||||
|
|
||||||
.. data:: FEED_MAX_ITEMS
|
.. data:: FEED_MAX_ITEMS
|
||||||
|
|
||||||
|
|
@ -949,7 +951,7 @@ the ``TAG_FEED_ATOM`` and ``TAG_FEED_RSS`` settings:
|
||||||
If you don't want to generate some or any of these feeds, set the above
|
If you don't want to generate some or any of these feeds, set the above
|
||||||
variables to ``None``.
|
variables to ``None``.
|
||||||
|
|
||||||
.. [2] ``%s`` is replaced by name of the category / author / tag.
|
.. [2] ``{slug}`` is replaced by name of the category / author / tag.
|
||||||
|
|
||||||
|
|
||||||
FeedBurner
|
FeedBurner
|
||||||
|
|
@ -1054,13 +1056,13 @@ section for more information.
|
||||||
one another. May be a string or a collection of strings. Set to ``None`` or
|
one another. May be a string or a collection of strings. Set to ``None`` or
|
||||||
``False`` to disable the identification of translations.
|
``False`` to disable the identification of translations.
|
||||||
|
|
||||||
.. data:: TRANSLATION_FEED_ATOM = 'feeds/all-%s.atom.xml'
|
.. data:: TRANSLATION_FEED_ATOM = 'feeds/all-{lang}.atom.xml'
|
||||||
|
|
||||||
The location to save the Atom feed for translations. [3]_
|
The location to save the Atom feed for translations. [3]_
|
||||||
|
|
||||||
.. data:: TRANSLATION_FEED_ATOM_URL = None
|
.. data:: TRANSLATION_FEED_ATOM_URL = None
|
||||||
|
|
||||||
Relative URL of the Atom feed for translations, including the ``%s``
|
Relative URL of the Atom feed for translations, including the ``{lang}``
|
||||||
placeholder. [3]_ If not set, ``TRANSLATION_FEED_ATOM`` is used both for
|
placeholder. [3]_ If not set, ``TRANSLATION_FEED_ATOM`` is used both for
|
||||||
save location and URL.
|
save location and URL.
|
||||||
|
|
||||||
|
|
@ -1070,11 +1072,11 @@ section for more information.
|
||||||
|
|
||||||
.. data:: TRANSLATION_FEED_RSS_URL = None
|
.. data:: TRANSLATION_FEED_RSS_URL = None
|
||||||
|
|
||||||
Relative URL of the RSS feed for translations, including the ``%s``
|
Relative URL of the RSS feed for translations, including the ``{lang}``
|
||||||
placeholder. [3]_ If not set, ``TRANSLATION_FEED_RSS`` is used both for save
|
placeholder. [3]_ If not set, ``TRANSLATION_FEED_RSS`` is used both for save
|
||||||
location and URL.
|
location and URL.
|
||||||
|
|
||||||
.. [3] %s is the language
|
.. [3] {lang} is the language code
|
||||||
|
|
||||||
|
|
||||||
Ordering content
|
Ordering content
|
||||||
|
|
|
||||||
|
|
@ -72,13 +72,6 @@ already exist). The ``git push origin gh-pages`` command updates the remote
|
||||||
``tasks.py``) created by the ``pelican-quickstart`` command publishes the
|
``tasks.py``) created by the ``pelican-quickstart`` command publishes the
|
||||||
Pelican site as Project Pages, as described above.
|
Pelican site as Project Pages, as described above.
|
||||||
|
|
||||||
.. note:: ghp-import on Windows
|
|
||||||
|
|
||||||
Until `ghp-import Pull Request #25
|
|
||||||
<https://github.com/davisp/ghp-import/pull/25>`_ is accepted, you will need
|
|
||||||
to install a custom build of ghp-import: ``pip install
|
|
||||||
https://github.com/chevah/ghp-import/archive/win-support.zip``
|
|
||||||
|
|
||||||
User Pages
|
User Pages
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -302,17 +302,21 @@ class ArticlesGenerator(CachingGenerator):
|
||||||
"""Generate the feeds from the current context, and output files."""
|
"""Generate the feeds from the current context, and output files."""
|
||||||
|
|
||||||
if self.settings.get('FEED_ATOM'):
|
if self.settings.get('FEED_ATOM'):
|
||||||
writer.write_feed(self.articles, self.context,
|
writer.write_feed(
|
||||||
self.settings['FEED_ATOM'],
|
self.articles,
|
||||||
self.settings.get('FEED_ATOM_URL',
|
self.context,
|
||||||
self.settings['FEED_ATOM']))
|
self.settings['FEED_ATOM'],
|
||||||
|
self.settings.get('FEED_ATOM_URL', self.settings['FEED_ATOM'])
|
||||||
|
)
|
||||||
|
|
||||||
if self.settings.get('FEED_RSS'):
|
if self.settings.get('FEED_RSS'):
|
||||||
writer.write_feed(self.articles, self.context,
|
writer.write_feed(
|
||||||
self.settings['FEED_RSS'],
|
self.articles,
|
||||||
self.settings.get('FEED_RSS_URL',
|
self.context,
|
||||||
self.settings['FEED_RSS']),
|
self.settings['FEED_RSS'],
|
||||||
feed_type='rss')
|
self.settings.get('FEED_RSS_URL', self.settings['FEED_RSS']),
|
||||||
|
feed_type='rss'
|
||||||
|
)
|
||||||
|
|
||||||
if (self.settings.get('FEED_ALL_ATOM') or
|
if (self.settings.get('FEED_ALL_ATOM') or
|
||||||
self.settings.get('FEED_ALL_RSS')):
|
self.settings.get('FEED_ALL_RSS')):
|
||||||
|
|
@ -323,80 +327,105 @@ class ArticlesGenerator(CachingGenerator):
|
||||||
order_by=self.settings['ARTICLE_ORDER_BY'])
|
order_by=self.settings['ARTICLE_ORDER_BY'])
|
||||||
|
|
||||||
if self.settings.get('FEED_ALL_ATOM'):
|
if self.settings.get('FEED_ALL_ATOM'):
|
||||||
writer.write_feed(all_articles, self.context,
|
writer.write_feed(
|
||||||
self.settings['FEED_ALL_ATOM'],
|
all_articles,
|
||||||
self.settings.get(
|
self.context,
|
||||||
'FEED_ALL_ATOM_URL',
|
self.settings['FEED_ALL_ATOM'],
|
||||||
self.settings['FEED_ALL_ATOM']))
|
self.settings.get('FEED_ALL_ATOM_URL',
|
||||||
|
self.settings['FEED_ALL_ATOM'])
|
||||||
|
)
|
||||||
|
|
||||||
if self.settings.get('FEED_ALL_RSS'):
|
if self.settings.get('FEED_ALL_RSS'):
|
||||||
writer.write_feed(all_articles, self.context,
|
writer.write_feed(
|
||||||
self.settings['FEED_ALL_RSS'],
|
all_articles,
|
||||||
self.settings.get(
|
self.context,
|
||||||
'FEED_ALL_RSS_URL',
|
self.settings['FEED_ALL_RSS'],
|
||||||
|
self.settings.get('FEED_ALL_RSS_URL',
|
||||||
self.settings['FEED_ALL_RSS']),
|
self.settings['FEED_ALL_RSS']),
|
||||||
feed_type='rss')
|
feed_type='rss'
|
||||||
|
)
|
||||||
|
|
||||||
for cat, arts in self.categories:
|
for cat, arts in self.categories:
|
||||||
if self.settings.get('CATEGORY_FEED_ATOM'):
|
if self.settings.get('CATEGORY_FEED_ATOM'):
|
||||||
writer.write_feed(arts, self.context,
|
writer.write_feed(
|
||||||
self.settings['CATEGORY_FEED_ATOM']
|
arts,
|
||||||
% cat.slug,
|
self.context,
|
||||||
self.settings.get(
|
self.settings['CATEGORY_FEED_ATOM'].format(slug=cat.slug),
|
||||||
'CATEGORY_FEED_ATOM_URL',
|
self.settings.get(
|
||||||
self.settings['CATEGORY_FEED_ATOM'])
|
'CATEGORY_FEED_ATOM_URL',
|
||||||
% cat.slug, feed_title=cat.name)
|
self.settings['CATEGORY_FEED_ATOM']).format(
|
||||||
|
slug=cat.slug
|
||||||
|
),
|
||||||
|
feed_title=cat.name
|
||||||
|
)
|
||||||
|
|
||||||
if self.settings.get('CATEGORY_FEED_RSS'):
|
if self.settings.get('CATEGORY_FEED_RSS'):
|
||||||
writer.write_feed(arts, self.context,
|
writer.write_feed(
|
||||||
self.settings['CATEGORY_FEED_RSS']
|
arts,
|
||||||
% cat.slug,
|
self.context,
|
||||||
self.settings.get(
|
self.settings['CATEGORY_FEED_RSS'].format(slug=cat.slug),
|
||||||
'CATEGORY_FEED_RSS_URL',
|
self.settings.get(
|
||||||
self.settings['CATEGORY_FEED_RSS'])
|
'CATEGORY_FEED_RSS_URL',
|
||||||
% cat.slug, feed_title=cat.name,
|
self.settings['CATEGORY_FEED_RSS']).format(
|
||||||
feed_type='rss')
|
slug=cat.slug
|
||||||
|
),
|
||||||
|
feed_title=cat.name,
|
||||||
|
feed_type='rss'
|
||||||
|
)
|
||||||
|
|
||||||
for auth, arts in self.authors:
|
for auth, arts in self.authors:
|
||||||
if self.settings.get('AUTHOR_FEED_ATOM'):
|
if self.settings.get('AUTHOR_FEED_ATOM'):
|
||||||
writer.write_feed(arts, self.context,
|
writer.write_feed(
|
||||||
self.settings['AUTHOR_FEED_ATOM']
|
arts,
|
||||||
% auth.slug,
|
self.context,
|
||||||
self.settings.get(
|
self.settings['AUTHOR_FEED_ATOM'].format(slug=auth.slug),
|
||||||
'AUTHOR_FEED_ATOM_URL',
|
self.settings.get(
|
||||||
self.settings['AUTHOR_FEED_ATOM'])
|
'AUTHOR_FEED_ATOM_URL',
|
||||||
% auth.slug, feed_title=auth.name)
|
self.settings['AUTHOR_FEED_ATOM']
|
||||||
|
).format(slug=auth.slug),
|
||||||
|
feed_title=auth.name
|
||||||
|
)
|
||||||
|
|
||||||
if self.settings.get('AUTHOR_FEED_RSS'):
|
if self.settings.get('AUTHOR_FEED_RSS'):
|
||||||
writer.write_feed(arts, self.context,
|
writer.write_feed(
|
||||||
self.settings['AUTHOR_FEED_RSS']
|
arts,
|
||||||
% auth.slug,
|
self.context,
|
||||||
self.settings.get(
|
self.settings['AUTHOR_FEED_RSS'].format(slug=auth.slug),
|
||||||
'AUTHOR_FEED_RSS_URL',
|
self.settings.get(
|
||||||
self.settings['AUTHOR_FEED_RSS'])
|
'AUTHOR_FEED_RSS_URL',
|
||||||
% auth.slug, feed_title=auth.name,
|
self.settings['AUTHOR_FEED_RSS']
|
||||||
feed_type='rss')
|
).format(slug=auth.slug),
|
||||||
|
feed_title=auth.name,
|
||||||
|
feed_type='rss'
|
||||||
|
)
|
||||||
|
|
||||||
if (self.settings.get('TAG_FEED_ATOM') or
|
if (self.settings.get('TAG_FEED_ATOM') or
|
||||||
self.settings.get('TAG_FEED_RSS')):
|
self.settings.get('TAG_FEED_RSS')):
|
||||||
for tag, arts in self.tags.items():
|
for tag, arts in self.tags.items():
|
||||||
if self.settings.get('TAG_FEED_ATOM'):
|
if self.settings.get('TAG_FEED_ATOM'):
|
||||||
writer.write_feed(arts, self.context,
|
writer.write_feed(
|
||||||
self.settings['TAG_FEED_ATOM']
|
arts,
|
||||||
% tag.slug,
|
self.context,
|
||||||
self.settings.get(
|
self.settings['TAG_FEED_ATOM'].format(slug=tag.slug),
|
||||||
'TAG_FEED_ATOM_URL',
|
self.settings.get(
|
||||||
self.settings['TAG_FEED_ATOM'])
|
'TAG_FEED_ATOM_URL',
|
||||||
% tag.slug, feed_title=tag.name)
|
self.settings['TAG_FEED_ATOM']
|
||||||
|
).format(slug=tag.slug),
|
||||||
|
feed_title=tag.name
|
||||||
|
)
|
||||||
|
|
||||||
if self.settings.get('TAG_FEED_RSS'):
|
if self.settings.get('TAG_FEED_RSS'):
|
||||||
writer.write_feed(arts, self.context,
|
writer.write_feed(
|
||||||
self.settings['TAG_FEED_RSS'] % tag.slug,
|
arts,
|
||||||
self.settings.get(
|
self.context,
|
||||||
'TAG_FEED_RSS_URL',
|
self.settings['TAG_FEED_RSS'].format(slug=tag.slug),
|
||||||
self.settings['TAG_FEED_RSS'])
|
self.settings.get(
|
||||||
% tag.slug, feed_title=tag.name,
|
'TAG_FEED_RSS_URL',
|
||||||
feed_type='rss')
|
self.settings['TAG_FEED_RSS']
|
||||||
|
).format(slug=tag.slug),
|
||||||
|
feed_title=tag.name,
|
||||||
|
feed_type='rss'
|
||||||
|
)
|
||||||
|
|
||||||
if (self.settings.get('TRANSLATION_FEED_ATOM') or
|
if (self.settings.get('TRANSLATION_FEED_ATOM') or
|
||||||
self.settings.get('TRANSLATION_FEED_RSS')):
|
self.settings.get('TRANSLATION_FEED_RSS')):
|
||||||
|
|
@ -409,19 +438,27 @@ class ArticlesGenerator(CachingGenerator):
|
||||||
items, order_by=self.settings['ARTICLE_ORDER_BY'])
|
items, order_by=self.settings['ARTICLE_ORDER_BY'])
|
||||||
if self.settings.get('TRANSLATION_FEED_ATOM'):
|
if self.settings.get('TRANSLATION_FEED_ATOM'):
|
||||||
writer.write_feed(
|
writer.write_feed(
|
||||||
items, self.context,
|
items,
|
||||||
self.settings['TRANSLATION_FEED_ATOM'] % lang,
|
self.context,
|
||||||
|
self.settings['TRANSLATION_FEED_ATOM']
|
||||||
|
.format(lang=lang),
|
||||||
self.settings.get(
|
self.settings.get(
|
||||||
'TRANSLATION_FEED_ATOM_URL',
|
'TRANSLATION_FEED_ATOM_URL',
|
||||||
self.settings['TRANSLATION_FEED_ATOM']) % lang)
|
self.settings['TRANSLATION_FEED_ATOM']
|
||||||
|
).format(lang=lang),
|
||||||
|
)
|
||||||
if self.settings.get('TRANSLATION_FEED_RSS'):
|
if self.settings.get('TRANSLATION_FEED_RSS'):
|
||||||
writer.write_feed(
|
writer.write_feed(
|
||||||
items, self.context,
|
items,
|
||||||
self.settings['TRANSLATION_FEED_RSS'] % lang,
|
self.context,
|
||||||
|
self.settings['TRANSLATION_FEED_RSS']
|
||||||
|
.format(lang=lang),
|
||||||
self.settings.get(
|
self.settings.get(
|
||||||
'TRANSLATION_FEED_RSS_URL',
|
'TRANSLATION_FEED_RSS_URL',
|
||||||
self.settings['TRANSLATION_FEED_RSS']) % lang,
|
self.settings['TRANSLATION_FEED_RSS']
|
||||||
feed_type='rss')
|
).format(lang=lang),
|
||||||
|
feed_type='rss'
|
||||||
|
)
|
||||||
|
|
||||||
def generate_articles(self, write):
|
def generate_articles(self, write):
|
||||||
"""Generate the articles."""
|
"""Generate the articles."""
|
||||||
|
|
|
||||||
|
|
@ -45,10 +45,10 @@ DEFAULT_CONFIG = {
|
||||||
'THEME_STATIC_DIR': 'theme',
|
'THEME_STATIC_DIR': 'theme',
|
||||||
'THEME_STATIC_PATHS': ['static', ],
|
'THEME_STATIC_PATHS': ['static', ],
|
||||||
'FEED_ALL_ATOM': posix_join('feeds', 'all.atom.xml'),
|
'FEED_ALL_ATOM': posix_join('feeds', 'all.atom.xml'),
|
||||||
'CATEGORY_FEED_ATOM': posix_join('feeds', '%s.atom.xml'),
|
'CATEGORY_FEED_ATOM': posix_join('feeds', '{slug}.atom.xml'),
|
||||||
'AUTHOR_FEED_ATOM': posix_join('feeds', '%s.atom.xml'),
|
'AUTHOR_FEED_ATOM': posix_join('feeds', '{slug}.atom.xml'),
|
||||||
'AUTHOR_FEED_RSS': posix_join('feeds', '%s.rss.xml'),
|
'AUTHOR_FEED_RSS': posix_join('feeds', '{slug}.rss.xml'),
|
||||||
'TRANSLATION_FEED_ATOM': posix_join('feeds', 'all-%s.atom.xml'),
|
'TRANSLATION_FEED_ATOM': posix_join('feeds', 'all-{lang}.atom.xml'),
|
||||||
'FEED_MAX_ITEMS': '',
|
'FEED_MAX_ITEMS': '',
|
||||||
'RSS_FEED_SUMMARY_ONLY': True,
|
'RSS_FEED_SUMMARY_ONLY': True,
|
||||||
'SITEURL': '',
|
'SITEURL': '',
|
||||||
|
|
@ -385,6 +385,26 @@ def handle_deprecated_settings(settings):
|
||||||
settings[f + '_REGEX_SUBSTITUTIONS'] = regex_subs
|
settings[f + '_REGEX_SUBSTITUTIONS'] = regex_subs
|
||||||
settings.pop(f + '_SUBSTITUTIONS', None)
|
settings.pop(f + '_SUBSTITUTIONS', None)
|
||||||
|
|
||||||
|
# `%s` -> '{slug}` or `{lang}` in FEED settings
|
||||||
|
for key in ['TRANSLATION_FEED_ATOM',
|
||||||
|
'TRANSLATION_FEED_RSS'
|
||||||
|
]:
|
||||||
|
if key in settings and '%s' in settings[key]:
|
||||||
|
logger.warning('%%s usage in %s is deprecated, use {lang} '
|
||||||
|
'instead. Falling back to default.', key)
|
||||||
|
settings[key] = DEFAULT_CONFIG[key]
|
||||||
|
for key in ['AUTHOR_FEED_ATOM',
|
||||||
|
'AUTHOR_FEED_RSS',
|
||||||
|
'CATEGORY_FEED_ATOM',
|
||||||
|
'CATEGORY_FEED_RSS',
|
||||||
|
'TAG_FEED_ATOM',
|
||||||
|
'TAG_FEED_RSS',
|
||||||
|
]:
|
||||||
|
if key in settings and '%s' in settings[key]:
|
||||||
|
logger.warning('%%s usage in %s is deprecated, use {slug} '
|
||||||
|
'instead. Falling back to default.', key)
|
||||||
|
settings[key] = DEFAULT_CONFIG[key]
|
||||||
|
|
||||||
return settings
|
return settings
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ REVERSE_CATEGORY_ORDER = True
|
||||||
DEFAULT_PAGINATION = 2
|
DEFAULT_PAGINATION = 2
|
||||||
|
|
||||||
FEED_RSS = 'feeds/all.rss.xml'
|
FEED_RSS = 'feeds/all.rss.xml'
|
||||||
CATEGORY_FEED_RSS = 'feeds/%s.rss.xml'
|
CATEGORY_FEED_RSS = 'feeds/{slug}.rss.xml'
|
||||||
|
|
||||||
LINKS = (('Biologeek', 'http://biologeek.org'),
|
LINKS = (('Biologeek', 'http://biologeek.org'),
|
||||||
('Filyb', "http://filyb.info/"),
|
('Filyb', "http://filyb.info/"),
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ SITEURL = '{{siteurl}}'
|
||||||
RELATIVE_URLS = False
|
RELATIVE_URLS = False
|
||||||
|
|
||||||
FEED_ALL_ATOM = 'feeds/all.atom.xml'
|
FEED_ALL_ATOM = 'feeds/all.atom.xml'
|
||||||
CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'
|
CATEGORY_FEED_ATOM = 'feeds/{slug}.atom.xml'
|
||||||
|
|
||||||
DELETE_OUTPUT_DIRECTORY = True
|
DELETE_OUTPUT_DIRECTORY = True
|
||||||
|
|
||||||
|
|
|
||||||
2
samples/pelican.conf.py
vendored
2
samples/pelican.conf.py
vendored
|
|
@ -18,7 +18,7 @@ DEFAULT_PAGINATION = 4
|
||||||
DEFAULT_DATE = (2012, 3, 2, 14, 1, 1)
|
DEFAULT_DATE = (2012, 3, 2, 14, 1, 1)
|
||||||
|
|
||||||
FEED_ALL_RSS = 'feeds/all.rss.xml'
|
FEED_ALL_RSS = 'feeds/all.rss.xml'
|
||||||
CATEGORY_FEED_RSS = 'feeds/%s.rss.xml'
|
CATEGORY_FEED_RSS = 'feeds/{slug}.rss.xml'
|
||||||
|
|
||||||
LINKS = (('Biologeek', 'http://biologeek.org'),
|
LINKS = (('Biologeek', 'http://biologeek.org'),
|
||||||
('Filyb', "http://filyb.info/"),
|
('Filyb', "http://filyb.info/"),
|
||||||
|
|
|
||||||
2
samples/pelican.conf_FR.py
vendored
2
samples/pelican.conf_FR.py
vendored
|
|
@ -22,7 +22,7 @@ ARTICLE_URL = 'posts/{date:%Y}/{date:%B}/{date:%d}/{slug}/'
|
||||||
ARTICLE_SAVE_AS = ARTICLE_URL + 'index.html'
|
ARTICLE_SAVE_AS = ARTICLE_URL + 'index.html'
|
||||||
|
|
||||||
FEED_ALL_RSS = 'feeds/all.rss.xml'
|
FEED_ALL_RSS = 'feeds/all.rss.xml'
|
||||||
CATEGORY_FEED_RSS = 'feeds/%s.rss.xml'
|
CATEGORY_FEED_RSS = 'feeds/{slug}.rss.xml'
|
||||||
|
|
||||||
LINKS = (('Biologeek', 'http://biologeek.org'),
|
LINKS = (('Biologeek', 'http://biologeek.org'),
|
||||||
('Filyb', "http://filyb.info/"),
|
('Filyb', "http://filyb.info/"),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue