Skip to content

Commit

Permalink
feat: add canonical
Browse files Browse the repository at this point in the history
  • Loading branch information
jandiralceu committed Sep 15, 2024
1 parent cbfb520 commit 23e4d61
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 14 deletions.
10 changes: 0 additions & 10 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,4 @@ export default [
"@typescript-eslint/no-explicit-any": "off",
},
},
// {
// overrides: [
// {
// files: ["src/images/**"],
// rules: {
// all: "off",
// },
// },
// ],
// },
];
15 changes: 12 additions & 3 deletions gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import type { GatsbyConfig } from "gatsby";

import algoliaQueries from "./algolia-queries";

const siteUrl = "https://jandir.co";

const config: GatsbyConfig = {
siteMetadata: {
title: `Jandir A. Cutabiala | Software Engineer`,
siteUrl: `https://jandir.co`,
siteUrl,
author: {
name: `Jandir A. Cutabiala`,
},
Expand Down Expand Up @@ -36,8 +38,8 @@ const config: GatsbyConfig = {
{
resolve: "gatsby-plugin-robots-txt",
options: {
host: "https://jandir.co",
sitemap: "https://jandir.co/sitemap",
host: siteUrl,
sitemap: `${siteUrl}/sitemap-index.xml`,
policy: [
{
userAgent: "*",
Expand All @@ -53,6 +55,13 @@ const config: GatsbyConfig = {
lang: "en",
},
},
{
resolve: `gatsby-plugin-canonical-urls`,
options: {
siteUrl,
stripQueryString: true,
},
},
{
resolve: "gatsby-plugin-mdx",
options: {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"dotenv": "16.4.5",
"gatsby": "5.13.7",
"gatsby-plugin-algolia": "1.0.3",
"gatsby-plugin-canonical-urls": "5.13.1",
"gatsby-plugin-google-gtag": "5.13.1",
"gatsby-plugin-google-tagmanager": "5.13.1",
"gatsby-plugin-html-attributes": "1.0.5",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function Footer() {

<div className="container m-auto flex justify-between items-center text-xs mt-20">
<p>All rights reserved © jandir.co {currentYear} </p>
<a href="http://" target="_blank" rel="noopener noreferrer">
<a href="/" target="_blank" rel="noopener noreferrer">
Term of use
</a>
</div>
Expand Down
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7679,6 +7679,13 @@ [email protected]:
algoliasearch "^4.9.1"
lodash.chunk "^4.2.0"

[email protected]:
version "5.13.1"
resolved "https://registry.yarnpkg.com/gatsby-plugin-canonical-urls/-/gatsby-plugin-canonical-urls-5.13.1.tgz#90ad65fb188afdde38fbbb412af4cbb11eef1847"
integrity sha512-rnVEfz7gIPgYk/go/fk5tM5Iv/7Qe6GonquhWMkDNPvRJPJ0qkv37Hv1l/BrC/2AHz9RNQsSZJRonVPPSHlhgA==
dependencies:
"@babel/runtime" "^7.20.13"

[email protected]:
version "5.13.1"
resolved "https://registry.yarnpkg.com/gatsby-plugin-google-gtag/-/gatsby-plugin-google-gtag-5.13.1.tgz#81b294f2ab12dad5ba5e9946e4b78cd315676bbc"
Expand Down

0 comments on commit 23e4d61

Please sign in to comment.