Skip to content

Commit

Permalink
Use better titles for Atom feeds
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Apr 27, 2018
1 parent 0ad8216 commit f66a417
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions nikola/nikola.py
Expand Up @@ -2302,14 +2302,17 @@ def atom_link(link_rel, link_type, link_href):
for post in posts:
deps += post.deps(lang)
uptodate_deps += post.deps_uptodate(lang)

context = {}
blog_title = self.config['BLOG_TITLE'](lang)
context["posts"] = posts
context["title"] = self.config['BLOG_TITLE'](lang)
context["title"] = blog_title
context["description"] = self.config['BLOG_DESCRIPTION'](lang)
context["lang"] = lang
context["prevlink"] = None
context["nextlink"] = None
context.update(extra_context)

context["title"] = "{0} ({1})".format(blog_title, context["title"]) if blog_title != context["title"] else blog_title

deps_context = copy(context)
deps_context["posts"] = [(p.meta[lang]['title'], p.permalink(lang)) for p in
posts]
Expand Down

0 comments on commit f66a417

Please sign in to comment.