diff --git a/src/layouts/global.astro b/src/layouts/global.astro
index d0a47f5..6900922 100644
--- a/src/layouts/global.astro
+++ b/src/layouts/global.astro
@@ -10,18 +10,28 @@ interface Props {
title: string;
description: string;
+ // Show the signup form. Blog posts get it automatically; other pages opt in,
+ // since it has no business interrupting the demo and player pages.
+ subscribe?: boolean;
+
frontmatter?: {
title: string;
date: string;
description: string;
cover?: string;
+ subscribe?: boolean;
};
}
let { title, frontmatter, description } = Astro.props;
+const { subscribe } = Astro.props;
if (frontmatter?.title) title = frontmatter.title;
if (frontmatter?.description) description = frontmatter.description;
+// `date` is what makes a page a blog post. An explicit flag, from either a prop
+// (.astro pages) or frontmatter (.mdx pages), wins over that default.
+const showSubscribe = subscribe ?? frontmatter?.subscribe ?? Boolean(frontmatter?.date);
+
const siteUrl = Astro.site?.toString().replace(/\/$/, "") ?? "https://moq.dev";
const pageUrl = new URL(Astro.url.pathname, siteUrl).toString();
const fullTitle = title ? `${title} - Media over QUIC` : "Media over QUIC";
@@ -121,7 +131,7 @@ const proUrl = import.meta.env.MODE === "staging" ? "https://moq.wtf" : "https:/
)
}
- {frontmatter?.date && }
+ {showSubscribe && }