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

bookmark card has problem get full of the canonical URL from a page #11209

Closed
huangyuzhang opened this issue Oct 8, 2019 · 3 comments
Closed

Comments

@huangyuzhang
Copy link

Issue Summary

When Insert a deep path URL from GitHub, even though the canonical URL is defined, the bookmark card will only get part of the URL.

To Reproduce

  1. go to this page: https://github.com/splitbrain/rpibplusleaf/blob/master/rpiblusleaf.pdf
  2. Copy the URL and insert it as a bookmark card in Ghost editor
  3. visit the bookmark card after publishing or viewing the draft, the URL stops at his GitHub repo, i.e. "https://github.com/splitbrain/rpibplusleaf".

Further, it seems that we cannot use bookmark card for those pages didn't set their canonical URL correctly. For example, when I add https://www.raspberrypi.org/documentation/remote-access/ssh/ as a bookmark card, but its canonical is "https://www.raspberrypi.org/". Is there a way that I can define the URL of a bookmark card manually or something like that?

Any help would be appreciated!

Technical details:

  • Ghost Version: v2.31
  • Node Version: v8.15.1
  • Browser/OS: Chrome 77 / MacOS Mojave
  • Database: SQLite3
@kevinansfield
Copy link
Member

The bookmark card currently gives preference to the Twitter Card / Open Graph data that the page includes for sharing across sites before falling back to the canonical URL.

In the GitHub case it does not provide page-specific data but links to a generic project page:

Screenshot 2019-10-08 at 08 46 37

For the raspberrypi.org case for some reason they have their canonical URL set to the homepage:

Screenshot 2019-10-08 at 08 56 41

These seem like problems with how those sites are coded because it's "breaking the web" to a certain extent. However, we can improve our handling of this by storing the url that is pasted in rather than one that is grabbed from the page.

@huangyuzhang
Copy link
Author

Storing the pasted URL sounds like a perfect solution for this!
Thank you!

@rishabhgrg
Copy link
Contributor

Closing in favor of #11212

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

3 participants