-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: add og tags to site #77
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
layout: ../../layouts/BlogLayout.astro | ||
title: "The Interledger Universe" | ||
description: "Or: “What the heck are all those products and protocols?”" | ||
ogImageUrl: /developers/img/blog/2024-08-13/og-image.png | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New frontmatter field that gets used in the BlogLayout template. |
||
date: 2024-08-13 | ||
slug: interledger-universe | ||
author: Sabine Schaller | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,12 @@ interface Props { | |
title: string; | ||
description?: string; | ||
gradient?: string; | ||
ogType?: string; | ||
ogImageUrl?: string; | ||
canonicalURL?: string; | ||
} | ||
|
||
const { title, description } = Astro.props; | ||
const { title, description, ogType, ogImageUrl, canonicalURL = new URL(Astro.url.pathname, Astro.site).href, } = Astro.props; | ||
--- | ||
|
||
<!doctype html> | ||
|
@@ -21,6 +24,12 @@ const { title, description } = Astro.props; | |
<meta name="viewport" content="width=device-width" /> | ||
<meta name="generator" content={Astro.generator} /> | ||
<title>{title ? `${title} | Interledger Foundation` : 'Interledger Foundation'}</title> | ||
|
||
<meta property="og:title" content={title ? `${title} | Interledger Foundation` : 'Interledger Foundation'} /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exposing |
||
<meta property="og:type" content={ogType ? ogType : 'website'} /> | ||
<meta property="og:image" content={ogImageUrl ? ogImageUrl : new URL('/img/og-image.png', Astro.site).href} /> | ||
<meta property="og:url" content={canonicalURL} /> | ||
|
||
<link rel="icon" type="image/svg+xml" href="/developers/favicon.svg" /> | ||
<script defer src="https://ilf-site-analytics.netlify.app/script.js" data-website-id="50d81dd1-bd02-4f82-8a55-34a09ccbbbd9" data-domains="interledger.org"></script> | ||
</head> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ const longDate = dateObj.toDateString().substring(4); | |
const rawHTMLString = `This article was originally published at <a href=${frontmatter.external_url}>${frontmatter.external_url}</a>.` | ||
--- | ||
|
||
<BaseLayout title={frontmatter.title}> | ||
<BaseLayout title={frontmatter.title} ogType="article" ogImageUrl={frontmatter.ogImageUrl ? new URL(frontmatter.ogImageUrl, Astro.site).href : new URL('/img/og-image.png', Astro.site).href}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Passing props all the way like turtles (bad reference, oh well) |
||
<main> | ||
<article itemscope itemtype="http://schema.org/Article" class="content-wrapper"> | ||
<ol class="breadcrumbs" itemscope itemtype="https://schema.org/BreadcrumbList"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sabine requested the receiver move down toward the ZAR node.