mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge remote-tracking branch 'ametaireau/plugins' into plugins
Conflicts: docs/settings.rst pelican/__init__.py pelican/generators.py pelican/settings.py setup.py
This commit is contained in:
commit
4fe67b8947
14 changed files with 368 additions and 3 deletions
|
|
@ -16,6 +16,7 @@ from pelican.contents import Article, Page, Category, is_valid_content
|
|||
from pelican.log import warning, error, debug, info
|
||||
from pelican.readers import read_file
|
||||
from pelican.utils import copy, process_translations, open
|
||||
from pelican import signals
|
||||
|
||||
|
||||
class Generator(object):
|
||||
|
|
@ -114,6 +115,7 @@ class ArticlesGenerator(Generator):
|
|||
self.authors = defaultdict(list)
|
||||
super(ArticlesGenerator, self).__init__(*args, **kwargs)
|
||||
self.drafts = []
|
||||
signals.article_generator_init.send(self)
|
||||
|
||||
def generate_feeds(self, writer):
|
||||
"""Generate the feeds from the current context, and output files."""
|
||||
|
|
@ -242,6 +244,7 @@ class ArticlesGenerator(Generator):
|
|||
metadata['date'] = datetime.datetime.fromtimestamp(
|
||||
os.stat(f).st_ctime)
|
||||
|
||||
signals.article_generate_context.send(self, metadata=metadata)
|
||||
article = Article(content, metadata, settings=self.settings,
|
||||
filename=f)
|
||||
if not is_valid_content(article, f):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue