OpenGraph og:url contains additional forward slash creating invalid URL (template/header.html issue?) #51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When a post/page (both, I think) is generated, the resulting
og:urlcontains an extra forward slash, meaning an invalid URL.For instance, on https://my-notes.dragas.net/about/, the og:url string is
<meta property="og:url" content="https://my-notes.dragas.net//about/">.I would have expected it to be
<meta property="og:url" content="https://my-notes.dragas.net/about/">, with one, not two, forward slashes between the site_url and the page_url.(Using your instance as an example, to rule it being a config issue on my side!)
For me, in config.sh.local, I have
SITE_URL="https://neilzone.co.uk"andURL_SLUG_FORMAT="Year/Month/slug" # Format for post URLs. Available: Year, Month, Day, slug, but I still get `I have edited my templates/header.html file, to change
<meta property="og:url" content="{{site_url}}/{{page_url}}">to<meta property="og:url" content="{{site_url}}{{page_url}}">. This has fixed it, but I don't know if this is the best way of fixing it.(Although the URL is invalid, it does not appear to impact display on Mastodon, but I do not understand why there is no impact.)
This should have been fixed in master - thanks!