ashhitch / gatsby-plugin-wpgraphql-seo

Gatsby Plugin to Bring Yoast Seo Data into Gatsby via WpGraphQL.
MIT License
13 stars 8 forks source link

custom permalink structure not recognized #2

Open phoshenwen opened 3 years ago

phoshenwen commented 3 years ago

Maybe not so much an issue as it is a discussion.

I changed WordPress' permalink structure to be /blog/%postname%, but when pulling the SEO data via graphql I don't see /blog/ reflected anywhere in there. As I am using this plugin for breadcrumbs as well I am technically missing a step in between "Home" and the blogpost title.

I've already downloaded the Yoast Test Helper plugin to clear its internal cache but that didn't help (helped to recognize permalink structure in the past, unrelated to Gatsby & this plugin).

In summary, the url pulled by the plugin correctly reflects the permalink structure, but I am only getting 2 objects in the array, instead of 3.

  "data": {
    "wpPost": {
      "seo": {
        "breadcrumbs": [
          {
            "text": "Home",
            "url": "/"
          },
          {
            "text": "Hello world!",
            "url": "/blog/hello-world/"
          }
        ]
      }
    }
  },

Is there any way to include "blog" in between Home and the blog post?

DanielRiveraHQ commented 3 years ago

@phoshenwen did you solved this one?

phoshenwen commented 3 years ago

@DanielRiveraHQ No I have no fix for this currently. Any feedback is welcome

snibbo71 commented 3 years ago

I've actually only just seen this, but I've opened a related issue to do with breadcrumbs as that url is invalid in any case - it needs to be the full URL or Google Search Console will start emailing about badly formed breadcrumbs.