Skip to content

Commit 1fe6f9d

Browse files
krunalcodesDSchau
authored andcommitted
feat(www): seo improvements (#13829)
* seo improvements * prettier fix
1 parent 2178756 commit 1fe6f9d

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

www/src/pages/plugins.js

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { Component } from "react"
2+
import { Helmet } from "react-helmet"
23
import Container from "../components/container"
34
import Rotator from "../components/rotator"
45
import { Link } from "gatsby"
@@ -11,6 +12,9 @@ class Plugins extends Component {
1112
render() {
1213
return (
1314
<>
15+
<Helmet>
16+
<title>Plugins</title>
17+
</Helmet>
1418
<Container
1519
overrideCSS={{
1620
alignItems: `center`,

www/src/templates/tags.js

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from "react"
2+
import { Helmet } from "react-helmet"
23
import { graphql } from "gatsby"
34
import TagsIcon from "react-icons/lib/ti/tags"
45

@@ -29,6 +30,9 @@ const Tags = ({ pageContext, data, location }) => {
2930

3031
return (
3132
<Layout location={location}>
33+
<Helmet>
34+
<title>{tags}</title>
35+
</Helmet>
3236
<Container>
3337
<h1>{tagHeader}</h1>
3438
<Button small key="blog-post-view-all-tags-button" to="/blog/tags">

www/src/templates/template-contributor-page.js

+24
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from "react"
2+
import { Helmet } from "react-helmet"
23
import { graphql } from "gatsby"
34
import Img from "gatsby-image"
45

@@ -16,6 +17,29 @@ class ContributorPageTemplate extends React.Component {
1617
return (
1718
<Layout location={this.props.location}>
1819
<main>
20+
<Helmet>
21+
<title>{contributor.id}</title>
22+
<meta name="description" content={contributor.bio} />
23+
<meta property="og:description" content={contributor.bio} />
24+
<meta name="twitter:description" content={contributor.bio} />
25+
<meta property="og:title" content={contributor.id} />
26+
{contributor.avatar && (
27+
<meta
28+
property="og:image"
29+
content={`https://gatsbyjs.org${
30+
contributor.avatar.childImageSharp.fixed.src
31+
}`}
32+
/>
33+
)}
34+
{contributor.avatar && (
35+
<meta
36+
name="twitter:image"
37+
content={`https://gatsbyjs.org${
38+
contributor.avatar.childImageSharp.fixed.src
39+
}`}
40+
/>
41+
)}
42+
</Helmet>
1943
<Container>
2044
<div
2145
css={{

0 commit comments

Comments
 (0)