Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic SEO set up for the landing page #55

Merged
merged 3 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions website/gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const config: GatsbyConfig = {
graphqlTypegen: true,
plugins: [
"gatsby-plugin-pnpm",
"gatsby-plugin-react-helmet",
{
resolve: "gatsby-plugin-manifest",
options: {
Expand Down
5 changes: 4 additions & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@
"dependencies": {
"gatsby": "^5.12.11",
"gatsby-plugin-manifest": "^5.12.3",
"gatsby-plugin-react-helmet": "^6.12.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"react-helmet": "^6.1.0"
},
"devDependencies": {
"@thesis-co/eslint-config": "^0.6.1",
"@types/node": "^20.9.4",
"@types/react": "^18.2.38",
"@types/react-dom": "^18.2.17",
"@types/react-helmet": "^6.1.9",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"eslint": "^8.54.0",
Expand Down
14 changes: 14 additions & 0 deletions website/src/components/SEO/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react"
import { Helmet } from "react-helmet"

function SEO() {
return (
<Helmet>
<meta charSet="utf-8" />
<title>Acre</title>
<link rel="canonical" href="https://acre.fi/" />
</Helmet>
)
}

export default SEO
10 changes: 7 additions & 3 deletions website/src/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import * as React from "react"
import SEO from "../components/SEO"

function NotFoundPage() {
return (
<main>
<h1>Page not found</h1>
</main>
<>
<SEO />
<main>
<h1>Page not found</h1>
</main>
</>
)
}

Expand Down
14 changes: 9 additions & 5 deletions website/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import * as React from "react"
import SEO from "../components/SEO"

function IndexPage() {
return (
<main>
<div className="placeholder">
<div className="placeholder_svg" />
</div>
</main>
<>
<SEO />
<main>
<div className="placeholder">
<div className="placeholder_svg" />
</div>
</main>
</>
)
}

Expand Down
Loading