Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
3 changes: 3 additions & 0 deletions apps/site/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -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()],
});
1 change: 1 addition & 0 deletions apps/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Binary file added apps/site/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions apps/site/public/robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ Content-Signal: search=yes, ai-input=yes, ai-train=yes
Allow: /
Disallow: /api/
Disallow: /mcp/
Disallow: /gmt/api/
Comment thread
baldurpan marked this conversation as resolved.
Resolved

Sitemap: https://northguild.dev/sitemap-index.xml
Sitemap: https://northguild.dev/gmt/sitemap-index.xml
19 changes: 18 additions & 1 deletion apps/site/src/layouts/Base.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -33,7 +41,16 @@ const ogAlt =
<meta name="color-scheme" content="dark" />
<title>{title}</title>
<meta name="description" content={description} />
<link rel="canonical" href={pageUrl} />
{noindex && <meta name="robots" content="noindex" />}
{!noindex && <link rel="canonical" href={pageUrl} />}
{
jsonLd && (
<script
type="application/ld+json"
set:html={JSON.stringify(jsonLd).replace(/</g, "\\u003c")}
/>
)
}
<meta property="og:type" content="website" />
<meta property="og:site_name" content="NorthGuild" />
<meta property="og:title" content={title} />
Expand Down
2 changes: 1 addition & 1 deletion apps/site/src/pages/404.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import Base from "../layouts/Base.astro";
---

<Base title="Not found | NorthGuild">
<Base title="Not found | NorthGuild" noindex>
<h1>Not found</h1>
<p class="intro">There is nothing at this address.</p>
<p><a class="gmt-sonar-focus home" href="/">Back to the home page</a></p>
Expand Down
11 changes: 10 additions & 1 deletion apps/site/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ import Base from "../layouts/Base.astro";
import Aurora from "../components/Aurora.astro";
import RepoCard from "../components/RepoCard.astro";

const organization = {
"@context": "https://schema.org",
"@type": "Organization",
name: "NorthGuild",
url: "https://northguild.dev/",
logo: "https://northguild.dev/logo.png",
sameAs: ["https://github.com/northguild"],
};

// Descriptions are each package's own `package.json` `description`, verbatim.
const repos = [
{
Expand All @@ -22,7 +31,7 @@ const repos = [
];
---

<Base title="NorthGuild" entrance>
<Base title="NorthGuild" entrance jsonLd={organization}>
<Aurora />
<h1 class="ng-enter-text">NorthGuild</h1>
<p class="intro ng-enter-text">Open-source tools for developers, built in the frigid north.</p>
Expand Down
4 changes: 3 additions & 1 deletion apps/site/src/scripts/aurora.worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ function siteForTimeZone(): number {

/** A frame on a timer, where the worker has no requestAnimationFrame. */
function nextFrameByTimer(cb: FrameRequestCallback): number {
return setTimeout(() => cb(performance.now()), FRAME_MS);
// `self.` keeps the type a number; the bare call is Node's `Timeout` once
// `@types/node` is installed.
return self.setTimeout(() => cb(performance.now()), FRAME_MS);
}

const nextFrame =
Expand Down
67 changes: 58 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading