forked from github/pelican
Remove trailing spaces
This commit is contained in:
parent
3376cd5400
commit
d5f0e2b80c
1 changed files with 4 additions and 4 deletions
|
|
@ -18,7 +18,7 @@ _DEFAULT_TEMPLATE_PATH =\
|
||||||
os.sep.join([os.path.dirname(os.path.abspath(__file__)), "themes"])
|
os.sep.join([os.path.dirname(os.path.abspath(__file__)), "themes"])
|
||||||
|
|
||||||
|
|
||||||
def generate_output(files, templates_path=None, output_path=None, markup=None,
|
def generate_output(files, templates_path=None, output_path=None, markup=None,
|
||||||
settings=None):
|
settings=None):
|
||||||
"""Given a list of files, a template and a destination,
|
"""Given a list of files, a template and a destination,
|
||||||
output the static files.
|
output the static files.
|
||||||
|
|
@ -51,7 +51,7 @@ def generate_output(files, templates_path=None, output_path=None, markup=None,
|
||||||
if hasattr(article, 'category'):
|
if hasattr(article, 'category'):
|
||||||
update_dict(categories, article.category, article)
|
update_dict(categories, article.category, article)
|
||||||
|
|
||||||
# order the articles by date
|
# order the articles by date
|
||||||
articles.sort(key=attrgetter('date'), reverse=True)
|
articles.sort(key=attrgetter('date'), reverse=True)
|
||||||
templates = get_templates(templates_path)
|
templates = get_templates(templates_path)
|
||||||
context = {}
|
context = {}
|
||||||
|
|
@ -169,7 +169,7 @@ class Article(object):
|
||||||
settings_overrides=extra_params)
|
settings_overrides=extra_params)
|
||||||
self.title = rendered_content.get('title')
|
self.title = rendered_content.get('title')
|
||||||
self.content = rendered_content.get('body')
|
self.content = rendered_content.get('body')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def url(self):
|
def url(self):
|
||||||
return '%s.html' % slugify(self.title)
|
return '%s.html' % slugify(self.title)
|
||||||
|
|
@ -177,6 +177,6 @@ class Article(object):
|
||||||
@property
|
@property
|
||||||
def summary(self):
|
def summary(self):
|
||||||
return self.content
|
return self.content
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '<%s "%s">' % (self.__class__.__name__, self.title)
|
return '<%s "%s">' % (self.__class__.__name__, self.title)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue