diff --git a/CLAUDE.md b/CLAUDE.md index 69ea555..05b8ed8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -31,4 +31,5 @@ and rewriting published history have to be asked for by name. - No left-border-only accents on cards; use a full border or a bottom border. - Colours come from `@northguild/theme` tokens. Amber is not used here. - `apps/site` must not extend `tsconfig.base.json`; it extends `astro/tsconfigs/strict`. -- One `robots.txt` serves the whole host, including `/gmt/`. Keep it exactly as is. +- One `robots.txt` serves the whole host, including `/gmt/`. Keep every existing line, + `Content-Signal` included. Add a line only for a new sitemap or a path crawlers should skip. diff --git a/apps/site/astro.config.mjs b/apps/site/astro.config.mjs index 3195acc..8f47e6b 100644 --- a/apps/site/astro.config.mjs +++ b/apps/site/astro.config.mjs @@ -1,7 +1,10 @@ import { defineConfig } from "astro/config"; +import sitemap from "@astrojs/sitemap"; // Static output; the Worker in wrangler.jsonc serves `dist/` as assets only. export default defineConfig({ site: "https://northguild.dev", output: "static", + // @astrojs/sitemap leaves the 404 and 500 pages out of the sitemap itself. + integrations: [sitemap()], }); diff --git a/apps/site/package.json b/apps/site/package.json index 8644fac..44d9cc5 100644 --- a/apps/site/package.json +++ b/apps/site/package.json @@ -10,6 +10,7 @@ "preview": "wrangler dev" }, "dependencies": { + "@astrojs/sitemap": "3.7.4", "@northguild/gmt": "^1.20.0", "@northguild/theme": "workspace:*", "astro": "7.2.7" diff --git a/apps/site/public/logo.png b/apps/site/public/logo.png new file mode 100644 index 0000000..c360a18 Binary files /dev/null and b/apps/site/public/logo.png differ diff --git a/apps/site/public/robots.txt b/apps/site/public/robots.txt index b0a8338..7570d83 100644 --- a/apps/site/public/robots.txt +++ b/apps/site/public/robots.txt @@ -3,5 +3,7 @@ Content-Signal: search=yes, ai-input=yes, ai-train=yes Allow: / Disallow: /api/ Disallow: /mcp/ +Disallow: /gmt/api/ +Sitemap: https://northguild.dev/sitemap-index.xml Sitemap: https://northguild.dev/gmt/sitemap-index.xml diff --git a/apps/site/src/layouts/Base.astro b/apps/site/src/layouts/Base.astro index 58ca76a..27693bd 100644 --- a/apps/site/src/layouts/Base.astro +++ b/apps/site/src/layouts/Base.astro @@ -11,11 +11,19 @@ interface Props { with `.ng-enter-*`, so a page that sets this should stagger them after it. */ entrance?: boolean; + /** Structured data for the page, written as one JSON-LD script. */ + jsonLd?: object; + /** Keeps the page out of search results: writes a robots `noindex` and + no canonical link, so the address cannot be indexed through its + canonical either. */ + noindex?: boolean; } const { title, description = "NorthGuild: open-source tools for developers.", entrance = false, + jsonLd, + noindex = false, } = Astro.props; // Social cards need absolute URLs. @@ -33,7 +41,16 @@ const ogAlt = {title} - + {noindex && } + {!noindex && } + { + jsonLd && ( +