Skip to content

Commit

Permalink
Merge branch 'master' into start-1782
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwpolska committed Jun 4, 2015
2 parents ab8765e + 5fd5478 commit c13b6bc
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion nikola/data/themes/base-jinja/templates/crumbs.tmpl
Expand Up @@ -7,7 +7,7 @@
{% for link, text in crumbs %}
{% if text != index_file %}
{% if link == '#' %}
<li>{{ text }}</li>
<li>{{ text.rsplit('.html', 1)[0] }}</li>
{% else %}
<li><a href="{{ link }}">{{ text }}</a></li>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion nikola/data/themes/base/templates/crumbs.tmpl
Expand Up @@ -7,7 +7,7 @@
% for link, text in crumbs:
% if text != index_file:
% if link == '#':
<li>${text}</li>
<li>${text.rsplit('.html', 1)[0]}</li>
% else:
<li><a href="${link}">${text}</a></li>
% endif
Expand Down
6 changes: 3 additions & 3 deletions nikola/plugins/task/galleries.py
Expand Up @@ -124,18 +124,18 @@ def _find_gallery_path(self, name):
def gallery_path(self, name, lang):
gallery_path = self._find_gallery_path(name)
return [_f for _f in [self.site.config['TRANSLATIONS'][lang]] +
list(os.path.split(gallery_path)) +
gallery_path.split(os.sep) +
[self.site.config['INDEX_FILE']] if _f]

def gallery_global_path(self, name, lang):
gallery_path = self._find_gallery_path(name)
return [_f for _f in list(os.path.split(gallery_path)) +
return [_f for _f in gallery_path.split(os.sep) +
[self.site.config['INDEX_FILE']] if _f]

def gallery_rss_path(self, name, lang):
gallery_path = self._find_gallery_path(name)
return [_f for _f in [self.site.config['TRANSLATIONS'][lang]] +
list(os.path.split(gallery_path)) +
gallery_path.split(os.sep) +
['rss.xml'] if _f]

def gen_tasks(self):
Expand Down
4 changes: 2 additions & 2 deletions nikola/plugins/task/listings.py
Expand Up @@ -256,7 +256,7 @@ def listing_path(self, namep, lang):
else:
utils.LOGGER.error("Unknown listing name {0}!".format(namep))
sys.exit(1)
if not name.endswith('/' + self.site.config["INDEX_FILE"]):
if not name.endswith(os.sep + self.site.config["INDEX_FILE"]):
name += '.html'
path_parts = list(os.path.split(name))
path_parts = name.split(os.sep)
return [_f for _f in path_parts if _f]
1 change: 1 addition & 0 deletions requirements-tests.txt
Expand Up @@ -5,3 +5,4 @@ pytest==2.7.1
pytest-cov==1.8.1
freezegun==0.3.3
python-coveralls==2.5.0
colorama==0.3.3
2 changes: 1 addition & 1 deletion scripts/jinjify.py
Expand Up @@ -78,7 +78,7 @@ def jinjify(in_theme, out_theme):
parent = mappings[child]

with io.open(os.path.join(out_theme, "parent"), "w+", encoding='utf-8') as outf:
outf.write(unicode(parent) + u'\n')
outf.write(u'{0}\n'.format(parent))

with io.open(os.path.join(out_theme, "engine"), "w+", encoding='utf-8') as outf:
outf.write(u"jinja\n")
Expand Down

0 comments on commit c13b6bc

Please sign in to comment.