Skip to content
Browse files

handle missing folders better

  • Loading branch information
ralsina committed Dec 24, 2015
1 parent ce07d6b commit f0aac4445ecb0b170910516cbb324bb301c9cc16
Showing with 3 additions and 3 deletions.
  1. +3 −3 nikola/
@@ -1297,11 +1297,11 @@ def _register_templated_shortcodes(self):
"""Register shortcodes provided by templates in shortcodes/ folders."""

builtin_sc_dir = resource_filename('nikola', os.path.join('data', 'shortcodes', utils.get_template_engine(self.THEMES)))
sc_dirs = [builtin_sc_dir]
if os.path.isdir('shortcodes'):
sc_dirs = [builtin_sc_dir, 'shortcodes']

for sc_dir in sc_dirs:
if not os.path.isdir(sc_dir):
for fname in os.listdir(sc_dir):
name, ext = os.path.splitext(fname)
if ext == '.tmpl':

0 comments on commit f0aac44

Please sign in to comment.
You can’t perform that action at this time.