Skip to content

SEO.js og.url is blank #2

@donaldboulton

Description

@donaldboulton

Each page needs its own title, description, and url = not the site title, description, and url

Google Search on og.url

Webmasters - Sharing - Facebook for Developers
https://developers.facebook.com › docs › sharing › webmasters
Open Graph markup; Testing Your Markup; Test Whether Facebook ... og:url. The canonical URL for your page. This should be the undecorated URL, without ...
‎Best Practices · ‎Using Objects · ‎Facebook Crawler · ‎Optimization

And in reality all page home page to posts or even a contact page needs it own meta information specific to the page. I have argued with the Gatsby community about this and it falls on deaf ears.

Go to my publiuslogic.com site and see meta data perfection on all pages or posts.

The above is done with react helmet in each page or posts templates and each query using canonical url's.

Tried many different ways with a single SEO component and never could figure out correct seo for all pages and posts

Line 88 of SEO.js

{ property: 'og:url', content: url},

I can get site url but not full path with

{ property: 'og:url', content: fullURL(path) }, I just get the site url

or trying

{ property: 'og:url', content: fullURL(pathname) }, = gives be no og.url???

Or add pathPrefix: /,
to site meta and then

const realPrefix = site.pathPrefix === '/' ? '' : site.pathPrefix
const url = site.siteUrl + realPrefix + slug

but slug is undefined.

A fix would be nice.
Thanks

Donald Boutlon

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions