Ghost: Can't set single canonical link of a post

Created on 8 Jan 2018  路  5Comments  路  Source: TryGhost/Ghost

Issue Summary

I believe #1388 created a possible issue where you can't define your own canonical link of a post.

Steps to Reproduce

  1. Set up a default instance of Ghost (with the default casper theme)
  2. Create a new page
  3. Under Post Settings > Code injection, add a canonical link to the page (ie <link rel="canonical" href="https://example.com/some-page">)
  4. Check the source code. You now have two canonical links

This makes it impossible to set a canonical link. It makes it impossible to publish an article on another site, and republish it on your own, while still pointing to the first site as the original source.

Maybe I'm missing something (should I put the canonical link elsewhere?), but I can't find it. It would be interesting to have a separate field for the canonical link.

Technical details:

  • Ghost Version: 1.18.0 (using the Ghost-Azure fork)
  • Node Version: 6.10.2
  • Browser/OS: any
  • Database: sqlite

Most helpful comment

Hey @petermorlion 馃憢 You're correct, it's not possible to change the canonical link for a post. This is a known limitation in Ghost, we're aware of it and it's on our internal feature tracking board as part of a larger meta overhaul.

As this is a feature request I'm going to close this issue as we use Github solely for bug tracking and on-going feature work.

All 5 comments

Hey @petermorlion 馃憢 You're correct, it's not possible to change the canonical link for a post. This is a known limitation in Ghost, we're aware of it and it's on our internal feature tracking board as part of a larger meta overhaul.

As this is a feature request I'm going to close this issue as we use Github solely for bug tracking and on-going feature work.

@kevinansfield any update on this feature?

@keyuls I believe it has been implemented in Ghost 2.x?

The canonical URL is always set to the URL that Ghost will serve the particular post/page on, there's no way to change that right now. If that changes in the future then this issue will be updated or there will be information for how to change the canonical URL in our docs so no need to ping on closed issues.

We've added the ability to set a custom canonical url per post/page. Shipped in 2.17.0.

Was this page helpful?
0 / 5 - 0 ratings