Skip to content

Commit c13b6bc

Browse files
committedJun 4, 2015
Merge branch 'master' into start-1782
2 parents ab8765e + 5fd5478 commit c13b6bc

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed
 

‎nikola/data/themes/base-jinja/templates/crumbs.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{% for link, text in crumbs %}
88
{% if text != index_file %}
99
{% if link == '#' %}
10-
<li>{{ text }}</li>
10+
<li>{{ text.rsplit('.html', 1)[0] }}</li>
1111
{% else %}
1212
<li><a href="{{ link }}">{{ text }}</a></li>
1313
{% endif %}

‎nikola/data/themes/base/templates/crumbs.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
% for link, text in crumbs:
88
% if text != index_file:
99
% if link == '#':
10-
<li>${text}</li>
10+
<li>${text.rsplit('.html', 1)[0]}</li>
1111
% else:
1212
<li><a href="${link}">${text}</a></li>
1313
% endif

‎nikola/plugins/task/galleries.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,18 @@ def _find_gallery_path(self, name):
124124
def gallery_path(self, name, lang):
125125
gallery_path = self._find_gallery_path(name)
126126
return [_f for _f in [self.site.config['TRANSLATIONS'][lang]] +
127-
list(os.path.split(gallery_path)) +
127+
gallery_path.split(os.sep) +
128128
[self.site.config['INDEX_FILE']] if _f]
129129

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

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

141141
def gen_tasks(self):

‎nikola/plugins/task/listings.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def listing_path(self, namep, lang):
256256
else:
257257
utils.LOGGER.error("Unknown listing name {0}!".format(namep))
258258
sys.exit(1)
259-
if not name.endswith('/' + self.site.config["INDEX_FILE"]):
259+
if not name.endswith(os.sep + self.site.config["INDEX_FILE"]):
260260
name += '.html'
261-
path_parts = list(os.path.split(name))
261+
path_parts = name.split(os.sep)
262262
return [_f for _f in path_parts if _f]

‎requirements-tests.txt

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ pytest==2.7.1
55
pytest-cov==1.8.1
66
freezegun==0.3.3
77
python-coveralls==2.5.0
8+
colorama==0.3.3

‎scripts/jinjify.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def jinjify(in_theme, out_theme):
7878
parent = mappings[child]
7979

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

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

0 commit comments

Comments
 (0)
Failed to load comments.