mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
multiple authors implemented
This commit is contained in:
parent
57155b561a
commit
2c25e488c4
16 changed files with 122 additions and 59 deletions
|
|
@ -74,11 +74,17 @@ class Content(object):
|
|||
#default template if it's not defined in page
|
||||
self.template = self._get_template()
|
||||
|
||||
# default author to the one in settings if not defined
|
||||
# First, read the authors from "authors", if not, fallback to "author"
|
||||
# and if not use the settings defined one, if any.
|
||||
if not hasattr(self, 'author'):
|
||||
if 'AUTHOR' in settings:
|
||||
if hasattr(self, 'authors'):
|
||||
self.author = self.authors[0]
|
||||
elif 'AUTHOR' in settings:
|
||||
self.author = Author(settings['AUTHOR'], settings)
|
||||
|
||||
if not hasattr(self, 'authors') and hasattr(self, 'author'):
|
||||
self.authors = [self.author]
|
||||
|
||||
# XXX Split all the following code into pieces, there is too much here.
|
||||
|
||||
# manage languages
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue