Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
use site.link to build tag URLs
- Loading branch information
Showing
1 changed file
with
3 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,11 +171,9 @@ def show_info_about_mising_module(modulename): | |
for tag in self.all_tags: | ||
tag = utils.slugify(tag.decode('utf8')) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
src_url = '{}tag/{}'.format(self.context['SITE_URL'], tag) | ||
# FIXME: this should check for PRETTY_URLs in existing config | ||
# probably reading that belongs in the Mixin | ||
if True: | ||
dst_url = self.context['SITE_URL'] + 'categories/' + tag + '.html' | ||
self.url_map[src_url] = dst_url | ||
dst_url = self.site.link('tag', tag) | ||
This comment has been minimized.
Sorry, something went wrong.
felixfontein
Contributor
|
||
if src_url != dst_url: | ||
self.url_map[src_url] = dst_url | ||
|
||
self.write_urlmap_csv( | ||
os.path.join(self.output_folder, 'url_map.csv'), self.url_map) | ||
|
Under Python 3, I get an exception here:
AttributeError: 'str' object has no attribute 'decode'
Don't know how to fix it, though. For me, I can just leave the
.decode('utf8')
away, but that'll probably not work everywhere.