From 9ef83dceb2b3d637df2b382e884fb48b1b058bd3 Mon Sep 17 00:00:00 2001 From: "Craig C." Date: Sat, 7 Nov 2026 20:51:22 +0200 Subject: [PATCH 1/2] feat(site): sitemap, logo and Organization data for search engines The home page is now in a sitemap, robots.txt names that sitemap beside the /gmt/ one, and the docs chat API under /gmt/api/ is no longer crawled. Every original robots.txt line stays, Content-Signal with ai-train=yes included. The home page states schema.org Organization data (name, url, logo, sameAs) and serves a 512 px logo.png rendered from favicon.svg. The 404 page carries noindex and no canonical, so it cannot be indexed as /404/. aurora.worker.ts calls self.setTimeout: the sitemap package brings in Node types, which made a bare setTimeout return Node's Timeout. Refs northguild/gmt#448 --- apps/site/astro.config.mjs | 7 +++ apps/site/package.json | 1 + apps/site/public/logo.png | Bin 0 -> 3104 bytes apps/site/public/robots.txt | 2 + apps/site/src/layouts/Base.astro | 19 ++++++- apps/site/src/pages/404.astro | 2 +- apps/site/src/pages/index.astro | 11 +++- apps/site/src/scripts/aurora.worker.ts | 4 +- pnpm-lock.yaml | 67 +++++++++++++++++++++---- 9 files changed, 100 insertions(+), 13 deletions(-) create mode 100644 apps/site/public/logo.png diff --git a/apps/site/astro.config.mjs b/apps/site/astro.config.mjs index 3195acc..840218c 100644 --- a/apps/site/astro.config.mjs +++ b/apps/site/astro.config.mjs @@ -1,7 +1,14 @@ 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", + // The 404 page is not a page to list. + integrations: [ + sitemap({ + filter: (page) => !/\/404\/?$/.test(new URL(page).pathname), + }), + ], }); 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 0000000000000000000000000000000000000000..c360a18a0da738d5823c91d7efafe66a48107ed6 GIT binary patch literal 3104 zcmeI!`&Sg_83*w1zFEc@9KvuBcfAgmg; z=Xsxb&-;Ad*>}A&dtyj%zhD3%8I#hc0gS#f@W!REU+PD6;bvz|Ov4M~v!{OlR-pIA zj5Kxnvg-D$^#|PZ1~%Lt+cYX8DQYTrsKY$Xms0L;@HfmnJu@{jGHqRWsC~@p$ zf`j^Wn2(0P5ud)$9d0cZ7C*Uk{L=B(M@6$Ph5f5EX#Ai>ty;;)ox94%FFV=Ur)Bt+ z&L`#X{qCbq;mglZcW2|LtDapMdE#Oqcu$b&)`ni?C!Tg(I$6}waj-trbRYtU3!hf* zpK>#BT|4{n<8kH>vru>D>ybB~|8vTX_M#wX6$*|g-0XT#b>dO|jbEUTfZq=1PhBy4 zMq9nEcbPtfbLIL_5UMGMGErBfTDHYu;cTh+F^`=VuWKyR-=d5%6mXQ0hEe5|5sm6E zWO0FnCbv}lGaiMMXkvOc=ko1BE!Ef;j{#I;xquQ1&1Cvi3RS@AQ7!H`RJf$#dpyoi zXc)66QK%HoEvh9x29Z>729Lkf+=7|C59hMfz`0hnG$f#f3Vtr24~6D3`#Tic2Inpc z#bNq9sW?f%>r~Lr?6DNui00p`mf{#B=S#(lc}%8J1DJgQg}i89ty(6?=%8slFnbn> z{^lw)Z&WSM!?9vGpE{A*=W(vKbhMq9#dmn5Dtu}o(J2(LwIOZiI%rc^gAn|Bx_1bEJRv0TG#hS@ToSYn<=D0>7^-= z32>Z}#e4x5=vgzE?x4^nC{|6Wh(Y67Sxo1VLv35k^a{~mPz@zfQwGGr(I|@(c`O;h zpIXH94$)s*4rQ#S+>gZ}T^2|4C{_4V$IPBzTfDc2GJP6lP=_KlWnlsiHOOLr0llei z6w`N5-JhEBW^k@ilaaekwPX{mr%$!c!WyGD*%JL~tFIXw_-=6Ftf_S8K@5KR!<`FL zhTVL2dwyhx)Q z%-)+qo6x+Dyv5=uO>}P$#T*Kipm~RC;i9pWrV+-Y$l~2Q+O(&?rgYe_l+sU_J-f-) zW;AbCEi1zCoaFTFp=c&=2`KZ+;zj|l5XCH}=TdrEH${=;yvrk&D89n7==wX?qq@jv{D$&=IC-+OxrLuc;yp{`{axHTxN zD_ZQ!@V3P}V+(Ww-x_Ox_nqMl@Qs;fH04Qd8^gCr{1MS)fS;kk03RhA;C+_`+@CAC zf5Q;4dbjU@PT=p_4Dh}T!2s``zz}5dZr=>Mm2>Tjg|kfc9peq~?igl(-@X=h7w2+E z!?|1a4dFrH-7A>^-dYU<{DgQoH>-nGqlsF z4X_jVhG+x4Pvs5pZZpF`3azGt3FrEA1lk&8$1H}iR`0z@*fT;?>M74H?dxmubcz0@ z(NG9{yI_EK%wY!j3$#LZ(SI}!N|dI2!Gpj%`ZELk1rH4HE%8uZ)09tW)H&Jla|QyR zQw{_C^q806>F>*-%Z?C+B?_NY4V}PO*j|DU5)AN;Aq-oS_?!*USBm~fng)SCD;VG# zRc3%+;)Q-%^berWNKH9Tqt45Xd2(^a5S7#wFjB_>FQ2VN;%nL*A2G!SY##?hF zcdW@1Wc6N7L7vLF{v;undRQo6=sCG@KGmS|YoOl|{nyfAxTn{y;r`Qb!~NZTy+UWL q`YOQT&4+Zt{P9Hhe|4<=cc|&{f%m@QQclv59~tS{X@^tt*8B(IAbA!5 literal 0 HcmV?d00001 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 && ( +