Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
da2x committed Apr 6, 2016
1 parent 60e9b25 commit 97c4ae3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nikola/utils.py
Expand Up @@ -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 '#'
Expand Down

0 comments on commit 97c4ae3

Please sign in to comment.