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'

This comment has been minimized.

@Kwpolska

Kwpolska Jun 13, 2015
Member

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…

This comment has been minimized.

@ralsina

ralsina Jun 13, 2015
Author Member

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

This comment has been minimized.

@Kwpolska

Kwpolska Jun 13, 2015
Member

okay, let’s merge it this way.

This comment has been minimized.

@Kwpolska

Kwpolska Jun 13, 2015
Member

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

This comment has been minimized.

@ralsina

ralsina Jun 14, 2015
Author Member

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

I'll see what I can do.

ralsina added 2 commits Jun 14, 2015
@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 pull request Jun 14, 2015
@ralsina ralsina merged commit 45b3a70 into master Jun 14, 2015
0 of 3 checks passed
0 of 3 checks passed
continuous-integration/appveyor Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
@ralsina ralsina deleted the fix-1168 branch Jun 14, 2015
@felixfontein

This comment has been minimized.

Copy link
Contributor

@felixfontein felixfontein commented on nikola/plugins/command/import_wordpress.py in b6cbfcb Jun 27, 2015

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.

This comment has been minimized.

Copy link
Contributor

@felixfontein felixfontein replied Jun 30, 2015

Is now fixed.

@felixfontein

This comment has been minimized.

Copy link
Contributor

@felixfontein felixfontein commented on nikola/plugins/command/import_wordpress.py in b6cbfcb Jun 27, 2015

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

This comment has been minimized.

Copy link
Member Author

@ralsina ralsina replied Jun 27, 2015

See #1824

This comment has been minimized.

Copy link
Contributor

@felixfontein felixfontein replied Jun 27, 2015

Cool :) Overlooked that.

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

Successfully merging this pull request may close these issues.

None yet

3 participants