Skip to content

Commit

Permalink
fix #1263 -- monthly archive links should end in /index.html
Browse files Browse the repository at this point in the history
Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 1, 2014
1 parent 1236ed6 commit 754dfeb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ Features
Bugfixes
--------

* Links in monthly archives did not have ``/index.html`` if STRIP_INDEXES
was set to False (Issue #1263)
* Fix lxml adding extra root tags being added by lxml by lxml.html.tostring
* not having typogrify installed now produces a valid error (Issue #1262)
* Not having typogrify installed now produces a valid error (Issue #1262)
* Pages were not rebuilt when DEMOTE_HEADERS was changed (Issue #1261)
* code.css was not rebuilt, even though there were changes in v6.4.0 to its
format (via Issue #1050)
Expand Down
4 changes: 2 additions & 2 deletions nikola/plugins/task/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ def gen_tasks(self):
post_list.reverse()
context["posts"] = post_list
else: # Monthly archives, just list the months
months = set([m.split('/')[1] for m in self.site.posts_per_month.keys() if m.startswith(str(year))])
months = set([(m.split('/')[1], self.site.link("archive", m, lang)) for m in self.site.posts_per_month.keys() if m.startswith(str(year))])
months = sorted(list(months))
months.reverse()
template_name = "list.tmpl"
context["items"] = [[nikola.utils.LocaleBorg().get_month_name(int(month), lang), month] for month in months]
context["items"] = [[nikola.utils.LocaleBorg().get_month_name(int(month), lang), link] for month, link in months]
post_list = []
task = self.site.generic_post_list_renderer(
lang,
Expand Down

0 comments on commit 754dfeb

Please sign in to comment.