Open ryanblakeley opened 6 years ago
If you click the "Share this post" Twitter button, the url that gets put into the tweet has a duplicate in the path The Fairy's Witches https://haysclark.github.io/gatsby-starter-casper/gatsby-starter-casper/the-fairy-witches
The Fairy's Witches https://haysclark.github.io/gatsby-starter-casper/gatsby-starter-casper/the-fairy-witches
src/components/PostShare.jsx is concatenating the pathPrefix with location.pathname which also includes the prefix. location.pathname gets passed in by src/templates/post.jsx
src/components/PostShare.jsx
pathPrefix
location.pathname
src/templates/post.jsx
This is how I fixed it: https://github.com/terrafarm/gatsby-casper-demo/commit/dde1913a606ff55b239e94098e85964e34891b41
If you click the "Share this post" Twitter button, the url that gets put into the tweet has a duplicate in the path
The Fairy's Witches https://haysclark.github.io/gatsby-starter-casper/gatsby-starter-casper/the-fairy-witches
src/components/PostShare.jsx
is concatenating thepathPrefix
withlocation.pathname
which also includes the prefix.location.pathname
gets passed in bysrc/templates/post.jsx