Skip to content

Commit

Permalink
Make post-list and post_list synonymous (Fix #3083) (#3084)
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina authored and Kwpolska committed May 9, 2018
1 parent 26c8f2b commit 74faaba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -9,6 +9,7 @@ Features
Bugfixes
--------

* Make post-list and post_list synonymous (Issue #3083)
* Make ``CATEGORY_PAGES_FOLLOW_DESTPATH`` more resilient (Issue #3081)
* Guard against null items in gallery meta files (Issues #3076, #3077)
* Respect ``USE_FILENAME_AS_TITLE`` in galleries with a meta file
Expand Down
1 change: 1 addition & 0 deletions nikola/plugins/compile/rest/post_list.py
Expand Up @@ -46,6 +46,7 @@ def set_site(self, site):
"""Set Nikola site."""
self.site = site
directives.register_directive('post-list', PostListDirective)
directives.register_directive('post_list', PostListDirective)
PostListDirective.site = site
return super(Plugin, self).set_site(site)

Expand Down
5 changes: 5 additions & 0 deletions nikola/plugins/shortcode/post_list.py
Expand Up @@ -120,6 +120,11 @@ class PostListShortcode(ShortcodePlugin):

name = "post_list"

def set_site(self, site):
"""Set the site."""
super(PostListShortcode, self).set_site(site)
site.register_shortcode('post-list', self.handler)

def handler(self, start=None, stop=None, reverse=False, tags=None, require_all_tags=False, categories=None,
sections=None, slugs=None, post_type='post', type=False,
lang=None, template='post_list_directive.tmpl', sort=None,
Expand Down

0 comments on commit 74faaba

Please sign in to comment.