--- import "../styles/global.css"; import PostHog from "../components/PostHog.astro"; import sequoia from "../../sequoia.json"; interface Props { title: string; description: string; /** "article" for a post, so unfurlers stop calling it a site. */ ogType?: "website" | "article"; /** AT-URI of the record this page was rendered from, if it has one. */ atUri?: string; } const { title, description, ogType = "website", atUri } = Astro.props; // The publication this site is. Read from the config that also fills // public/.well-known/site.standard.publication, so the tag and the endpoint a // verifier checks it against cannot drift. Before `sequoia init` runs the // config carries a placeholder, and a tag resolving to nothing is worse than // no tag — the same rule the document link below follows. const publication = /^at:\/\/[^/]+\/site\.standard\.publication\/[^/]+$/.test( sequoia.publicationUri, ) ? sequoia.publicationUri : undefined; // Unfurl crawlers resolve nothing relative, so these must be absolute. const canonical = new URL(Astro.url.pathname, Astro.site); const card = new URL("/og.png", Astro.site); --- {title} { /* Every page says which publication it belongs to, so a reader that already has the page does not have to probe the origin to find out — and a reader that only probes still gets the same answer from the well-known. */ } {publication && } { /* The canonical link's ATProto counterpart. Only a page with a record carries it: a verifier resolves the href, so an empty one is worse than a missing tag. */ } {atUri && } {/* Twitter falls back to og:* for everything but the card type. */} { /* Feed autodiscovery, on every page: a subscribe button asks whatever address it was handed, not just /posts. */ } {/* Production builds only, so dev servers don't pollute analytics. */} {import.meta.env.PROD && }