Skip to content

Commit

Permalink
Provide proper canonical URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
ButterscotchV committed Nov 18, 2024
1 parent 873c4e8 commit dbb5e74
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/_data/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ export default {
name: "Butterscotch!",
url: "https://bscotch.ca/"
},
image: "/img/avatar.png"
image: "/img/avatar.png",
manifest: "/site.webmanifest"
}
10 changes: 5 additions & 5 deletions src/_includes/layouts/embed.njk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<meta property="og:locale" content="en_US">

<link rel="canonical" href="{{ page.url | url }}">
<meta property="og:url" content="{{ page.url | url }}">
<link rel="canonical" href="{{ page.url | htmlBaseUrl(metadata.url) }}">
<meta property="og:url" content="{{ page.url | htmlBaseUrl(metadata.url) }}">

<meta property="og:site_name" content="{{ metadata.title }}">

Expand All @@ -11,8 +11,8 @@
<meta name="description" content="{{ description or metadata.description }}">
<meta property="og:description" content="{{ description or metadata.description }}">

<meta property="og:image" content="{{ image or metadata.image | url }}">
<meta property="twitter:image" content="{{ image or metadata.image | url }}">
<meta property="og:image" content="{{ image or metadata.image }}">
<meta property="twitter:image" content="{{ image or metadata.image }}">

<meta property="og:type" content="website">
<meta name="twitter:card" content="summary">
Expand All @@ -21,4 +21,4 @@
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">

<link rel="manifest" href="/site.webmanifest">
<link rel="manifest" href="{{ manifest or metadata.manifest }}">

0 comments on commit dbb5e74

Please sign in to comment.