Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #1168 #1820

Merged
merged 4 commits into from Jun 14, 2015
Merged

fix #1168 #1820

merged 4 commits into from Jun 14, 2015

Conversation

ralsina
Copy link
Member

@ralsina ralsina commented Jun 13, 2015

Add redirects for wordpress tags

# Add tag redirects
for tag in self.all_tags:
tag = utils.slugify(tag.decode('utf8'))
self.url_map['{}tag/{}'.format(self.context['SITE_URL'], tag)] = self.context['SITE_URL'] + 'categories/' + tag + '.html'
Copy link
Member

@Kwpolska Kwpolska Jun 13, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this guaranteed to be the path? I don’t think so, as it’s either (a) fully customizable or (b) htaccess-dependent…

And it did not take me long (a look in my RSS, in fact) to find a blog with /post/tag/ as the path…

Copy link
Member Author

@ralsina ralsina Jun 13, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the path is nowhere in the dump that I can see. Worst case, the user can search/replace.

Copy link
Member

@Kwpolska Kwpolska Jun 13, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, let’s merge it this way.

Copy link
Member

@Kwpolska Kwpolska Jun 13, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…or let’s not. you seem to ignore PRETTY_URLS here.

Copy link
Member Author

@ralsina ralsina Jun 14, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the importer never even looks at the existing site's config so far.

I'll see what I can do.

@ralsina
Copy link
Member Author

@ralsina ralsina commented Jun 14, 2015

@Kwpolska I made it do "the right thing" which is to use site.config. However, it will not currently do the right thing until I fix #1823

I propose we merge this as is.

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Jun 14, 2015

👍 for merging, please handle this yourself (in a terminal, unfortunately).

ralsina added a commit that referenced this issue Jun 14, 2015
@ralsina ralsina merged commit 45b3a70 into master Jun 14, 2015
0 of 3 checks passed
@ralsina ralsina deleted the fix-1168 branch Jun 14, 2015
felixfontein
Copy link
Contributor

@felixfontein felixfontein commented on b6cbfcb Jun 27, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

felixfontein
Copy link
Contributor

@felixfontein felixfontein commented on b6cbfcb Jun 27, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This results in nikola.utils.LocaleBorgUninitializedException: Attempt to use LocaleBorg before initialization being raised.

ralsina
Copy link
Member Author

@ralsina ralsina commented on b6cbfcb Jun 27, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #1824

felixfontein
Copy link
Contributor

@felixfontein felixfontein commented on b6cbfcb Jun 27, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool :) Overlooked that.

felixfontein
Copy link
Contributor

@felixfontein felixfontein commented on b6cbfcb Jun 30, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is now fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants