Skip to content
Permalink
Browse files

Update utils.py

  • Loading branch information
da2x committed Apr 6, 2016
1 parent 60e9b25 commit 97c4ae382b19cce574c7479d05063902775323a5
Showing with 4 additions and 2 deletions.
  1. +4 −2 nikola/utils.py
@@ -951,8 +951,10 @@ def get_crumbs(path, is_file=False, index_folder=None, lang=None):
for i, crumb in enumerate(crumbs[-3::-1]): # Up to parent folder only
_path = '/'.join(['..'] * (i + 1))
_crumbs.append([_path, crumb])
_crumbs.insert(0, ['.', crumbs[-2]]) # file's folder
_crumbs.insert(0, ['#', crumbs[-1]]) # file itself
if len(crumbs) >= 2:
_crumbs.insert(0, ['.', crumbs[-2]]) # file's folder
if len(crumbs) >= 1:
_crumbs.insert(0, ['#', crumbs[-1]]) # file itself
else:
for i, crumb in enumerate(crumbs[::-1]):
_path = '/'.join(['..'] * i) or '#'

0 comments on commit 97c4ae3

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