mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
contents: Page fallbacks for context and localsiteurl
This commit is contained in:
parent
f63325aa9a
commit
fdde17281d
1 changed files with 3 additions and 1 deletions
|
|
@ -48,6 +48,8 @@ class Content(object):
|
|||
|
||||
self.settings = settings
|
||||
self._content = content
|
||||
if context is None:
|
||||
context = {}
|
||||
self._context = context
|
||||
self.translations = []
|
||||
|
||||
|
|
@ -220,7 +222,7 @@ class Content(object):
|
|||
|
||||
@property
|
||||
def content(self):
|
||||
return self.get_content(self._context['localsiteurl'])
|
||||
return self.get_content(self._context.get('localsiteurl', ''))
|
||||
|
||||
def _get_summary(self):
|
||||
"""Returns the summary of an article.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue