Skip to content

Commit

Permalink
🔍 Add OpenGraph tags
Browse files Browse the repository at this point in the history
  • Loading branch information
querkmachine committed Jan 30, 2024
1 parent c7631e5 commit 1592081
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/_layouts/layout.njk
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
'https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,700;1,400&display=swap'
-%}
<!DOCTYPE html>
<html lang="en">
<html lang="en-GB" dir="ltr">
<head>
{# Technical metadata #}
<meta charset="UTF-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1, viewport-fit=cover" />
{%- if siteMetadata.developmentMode or pageMetadata.noRobots %}
{%- if siteMetadata.developmentMode or metadata.noRobots %}
<meta name="robots" content="noindex, nofollow" />
{%- endif %}

Expand All @@ -32,6 +32,19 @@
<link rel="mask-icon" href="{{ '/assets/icons/icon-mask.svg' | url }}" color="#bc0031">
<link rel="manifest" href="{{ '/assets/icons/manifest.json' | url }}">

{#- Content metadata / OpenGraph #}
<link rel="canonical" href="{{ siteMetadata.domainName + page.url | url }}">
<meta property="og:url" content="{{ siteMetadata.domainName + page.url | url }}">
<meta property="og:locale" content="en_GB">
<meta property="og:title" content="{{ metadata.title | default(title) | default(siteMetadata.name) }}">
<meta property="og:site_name" content="{{ siteMetadata.name }}">
<meta property="og:image" content="{{ '/assets/icons/opengraph.png' | url }}">
<meta property="og:type" content="website">
{%- if metadata.description %}
<meta name="description" content="{{ metadata.description }}">
<meta property="og:description" content="{{ metadata.description }}">
{%- endif %}

{# Page title #}
<title>
{%- if title %}
Expand Down
Binary file added src/assets/icons/opengraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1592081

Please sign in to comment.