diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 8fc82b8..a3ac5eb 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -15,15 +15,21 @@ import SiteHeader from '../components/layout/SiteHeader.astro'; import SiteFooter from '../components/layout/SiteFooter.astro'; import CookieConsent from '../components/layout/CookieConsent.astro'; import { buildSeo, type SeoInput } from '../lib/seo'; -import { site } from '../lib/site'; +import { canonicalUrl, site } from '../lib/site'; interface Props extends SeoInput { /** JSON-LD graph nodes appended to the page */ schema?: unknown[]; bodyClass?: string; + /** + * The feed this page is a view of, when it is not the site-wide one. An + * engine archive that advertises /rss.xml subscribes the reader to all 104 + * posts, which is the opposite of what they clicked. + */ + feed?: { href: string; title: string }; } -const { schema = [], bodyClass, ...seoInput } = Astro.props; +const { schema = [], bodyClass, feed, ...seoInput } = Astro.props; const seo = buildSeo(seoInput); const jsonLd = { @@ -87,7 +93,8 @@ const jsonLd = { - + {feed && } +