Prerequisities
- A Gatsby Blog, or if you don’t have one you can find out how to create one here.
Approach
I ran into a problem with Google Search console later on, saying that I had redirect errors on my blog.
I deduced that the problem had to do with my whole <a>
links, so I decided I needed relative paths
in this blog.
Let’s first install gatsby-plugin-catch-links
with npm install gatsby-plugin-catch-links
.
Then add this plugin to your gatsby-config.js
:
{
resolve: `gatsby-plugin-catch-links`
}
And now you can change your links to:
/links-in-gatsby-blog
depending on how your folders are named.
Nothing more, nothing less.