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

No support for legacy Blogger or WP routes #6055

Closed
JavascriptMick opened this issue Nov 8, 2015 · 7 comments
Closed

No support for legacy Blogger or WP routes #6055

JavascriptMick opened this issue Nov 8, 2015 · 7 comments

Comments

@JavascriptMick
Copy link

I can convert my blog from blogger with the various tools however one it is imported, I can't find any way to support my legacy URL format. e.g.

http://www.michaeldausmann.com/2014/09/how-to-not-learn-coffee-script-in-90.html

I have deployed a ghost instance with a horrible kluge to hard code my legacy routes but this is hardly a great solution.

https://gist.github.com/mdausmann/02c4993d11a8776f6842

Interested in any suggestions or plans for supporting this. I can help with implementation if a clear approach can be agreed.

@acburdine
Copy link
Member

The problem seems to be in the tools used to convert from Blogger to Ghost. In theory, if the 'slug' attribute of the post is set correctly in Ghost, then those routes could in theory work without the workaround you have set. (See http://support.ghost.org/post-settings-overview/ for info on how to set the post slug.)

IMO, supporting something like legacy blogging routes from other blogging systems in Ghost itself rather than in an import tool quickly gets bloated, due to the many different url styling flavors of the various platforms.

I would take this issue up with whatever tool you used to convert from Blogger data to data imported by Ghost.

@jgillich
Copy link
Contributor

jgillich commented Nov 8, 2015

These redirects can be done by a proxy in front of ghost, like nginx or haproxy, no need to hack the core.

@acburdine You can change the slug, but permalinks are fixed to /yyyy/mm/dd/ and can't be changed.

@acburdine
Copy link
Member

@jgillich yeah I get that, but the permalink structure doesn't seem to be the issue here (at least based on the gist) - also, that's technically configurable in the database settings table iirc

I agree that an nginx proxy can also be used, but IMO fixing this issue in the blogger-to-ghost conversion tool (if there is one) is the better way to fix this.

@acburdine
Copy link
Member

I realized that it isn't possible to set the '.html' endings for a post slug in the post itself, however, you can change the permalinks setting in the database itself. By default it is set to /:slug/ but it works if you change the value to /:year/:month/:slug.html/ it should support the same format as the legacy Blogger format. The only downside is that all of your posts from then on would have that same format.

Also, you still would have to go to each post and shorten the slug, as it appears Blogger's slug max length is shorter than Ghost's.

@jgillich
Copy link
Contributor

jgillich commented Nov 9, 2015

That is true. Can I maybe help with #1631 or do you want a different UI for that @ErisDS?

@JavascriptMick
Copy link
Author

@acburdine Agree, the conversion tool is the best place for this type of thing if the core supports it but from your comments it doesn't look like it is supported fully.

FYI, the tool I used to do the conversion is https://www.npmjs.com/package/blogger2ghost It was pretty easy and worked well. I don't much like the permalinks setting idea as I don't' really want to keep the year/month/post format going forward, it is ugly and arbitrary.

@jgillich I hadn't thought of using my proxy for that purpose, I am self hosting behind nginx so that is a viable option for me, most average folks might find that a bit difficult though.

@ErisDS
Copy link
Member

ErisDS commented Nov 11, 2015

Hey @mdausmann, I definitely recommend moving those redirects to nginx - it will be much more performant and that is the expected way to do redirects with Ghost.

A few notes on what has been said:

  • Ghost provides, by default, what is considered the best url format for SEO purposes. It is recommended that if you're migrating that you move your urls and add 301 redirects for the old content to get the best experience.
  • Ghost does provide a single checkbox to switch to one of WordPress's default permalink setups as that is very a common setup.
  • If you want a different permalink structure, you can achieve many different structures by editing the setting in the DB. There is no UI at present and no plans to add one for the time being as this is a one-time configuration issue that is requested very, very rarely. If you're on Ghost(Pro) you can email support to have this change made for you.
  • Ghost does not provide for adding redirects. Ghost has to be run behind either nginx or apache, and both of those provide excellent tools for redirecting that will be more performant. Redirects are really a web-server level feature and it makes no sense for us to redo in Ghost what is already done better one level up. Therefore again there is no plan to add this any time in the near future. Again, for Pro users, you can email support.

What would be nice is if the tools like blogger 2 ghost generated a set of redirection rules for you to plug directly into nginx/apache. That's something to raise against those individual projects, although I believe @cobbspur has worked on blogger2ghost.

TLDR; theres not really anything for Ghost to do here.

@ErisDS ErisDS closed this as completed Nov 11, 2015
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

No branches or pull requests

4 participants