Skip to content

Commit

Permalink
Manage canonical url with react-helmet so easy for a blog post to ove…
Browse files Browse the repository at this point in the history
…rride it
  • Loading branch information
KyleAMathews committed Apr 2, 2018
1 parent 35b4ada commit 65cef38
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,6 @@ My blog is now deployed on Netlify CDN, which means the user will be served fast

![after](./results.png)

Quite a difference, right? Long story short - Gatsby is great. You should give it a try, especially if you are a front-end developer. And keep watching its development as I am sure we can look forward to even more awesomeness in the future. If Gatsby is not your cup of the, you should still consider switching to a static site generator as the advantages are too good to ignore. To learn more about Gatsby Check [this curated list](/docs/awesome-gatsby/) of Gatsby-related resources.
Quite a difference, right? Long story short - Gatsby is great. You should give it a try, especially if you are a front-end developer. And keep watching its development as I am sure we can look forward to even more awesomeness in the future. If Gatsby is not your cup of the, you should still consider switching to a static site generator as the advantages are too good to ignore. To learn more about Gatsby, check out [this curated list](/docs/awesome-gatsby/) of Gatsby-related resources.

_This article was originally published on [Vojtech Ruzicka's Blog](https://www.vojtechruzicka.com/)._
6 changes: 0 additions & 6 deletions www/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ module.exports = {
pathToConfigModule: `src/utils/typography`,
},
},
{
resolve: `gatsby-plugin-canonical-urls`,
options: {
siteUrl: `https://www.gatsbyjs.org`,
},
},
`gatsby-transformer-sharp`,
`gatsby-transformer-documentationjs`,
`gatsby-transformer-yaml`,
Expand Down
1 change: 0 additions & 1 deletion www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"gatsby": "^1.9.225",
"gatsby-image": "^1.0.41",
"gatsby-link": "^1.6.38",
"gatsby-plugin-canonical-urls": "^1.0.15",
"gatsby-plugin-catch-links": "^1.0.19",
"gatsby-plugin-feed": "^1.3.19",
"gatsby-plugin-fullstory": "^1.0.0",
Expand Down
4 changes: 4 additions & 0 deletions www/src/layouts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ class DefaultLayout extends React.Component {
<meta name="twitter:site" content="@gatsbyjs" />
<meta name="og:type" content="website" />
<meta name="og:site_name" content="GatsbyJS" />
<link
rel="canonical"
href={`https://gatsbyjs.org${this.props.location.pathname}`}
/>
<html lang="en" />
</Helmet>
<Navigation pathname={this.props.location.pathname} />
Expand Down

0 comments on commit 65cef38

Please sign in to comment.