Skip to content

Commit 8207482

Browse files
author
ndthanhdev
committed
add seo
1 parent 17bb6b8 commit 8207482

11 files changed

Lines changed: 68 additions & 2 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
64.6 KB
Binary file not shown.

.yarn/install-state.gz

3.67 KB
Binary file not shown.

gatsby-config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,12 @@ module.exports = {
6666
},
6767
},
6868
},
69+
{
70+
resolve: "gatsby-plugin-google-tagmanager",
71+
options: {
72+
id: "GTM-KX72TPPN",
73+
includeInDevelopment: true,
74+
},
75+
},
6976
],
7077
};

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"@types/node": "^17.0.29",
5151
"@types/react": "^18.0.8",
5252
"@types/react-dom": "^18.0.2",
53+
"gatsby-plugin-google-tagmanager": "^5.12.0",
5354
"typescript": "^4.6.3"
5455
},
5556
"packageManager": "yarn@3.2.0"

src/components/.gitkeep

Whitespace-only changes.

src/components/seo.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from "react";
2+
import { Helmet } from "react-helmet";
3+
4+
export const SEO = () => (
5+
<Helmet>
6+
<meta
7+
name="google-site-verification"
8+
content="9OBwzAgCmUComfywGqCjEriNiYJ8qS4OYM9Fz4fan7s"
9+
/>
10+
</Helmet>
11+
);

src/layouts/index.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,20 @@ let Layout: React.FC<{
2525
}> = function Layout(props) {
2626
const { children, pageContext } = props;
2727

28+
let content = null;
29+
2830
if (pageContext?.layout === "cv") {
29-
return <CvLayout>{children}</CvLayout>;
31+
content = <CvLayout>{children}</CvLayout>;
3032
}
3133

32-
return <div>{children}</div>;
34+
content = <div>{children}</div>;
35+
36+
return (
37+
<>
38+
<SEO />
39+
{content}
40+
</>
41+
);
3342
};
3443

3544
export default Layout;

0 commit comments

Comments
 (0)