Skip to content
Permalink
Browse files
Make post-list and post_list synonymous (Fix #3083) (#3084)
  • Loading branch information
ralsina authored and Kwpolska committed May 9, 2018
1 parent 26c8f2b commit 74faabab836c2d6d88114fe654df80ee98671b2b
Showing with 7 additions and 0 deletions.
  1. +1 −0 CHANGES.txt
  2. +1 −0 nikola/plugins/compile/rest/post_list.py
  3. +5 −0 nikola/plugins/shortcode/post_list.py
@@ -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
@@ -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)

@@ -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,

0 comments on commit 74faaba

Please sign in to comment.