Skip to content

Site: the new Org.AI mark and favicons; fix the theme-script error and a broken 404 link - #50

Merged
bryant22 merged 4 commits into
mainfrom
fix/logo-favicon-theme-script
Oct 11, 2026
Merged

bryant22 merged 4 commits into
mainfrom
fix/logo-favicon-theme-script

Conversation

@bryant22

@bryant22 bryant22 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

What was wrong on primitives.org.ai

  • Every page threw ReferenceError: __name is not defined while loading, so a visitor's saved light or dark theme wasn't applied before the page painted.
  • No favicon (/favicon.ico was a 404), and the old .org.ai logo.
  • The 404 page's "Documentation" button went to /docs, which doesn't exist.

The fix

  • site/wrangler.jsonc now sets "keep_names": false. next-themes inlines its script from the function's source text, and Wrangler's default keep_names inserts __name() calls into that text, which the browser doesn't have.
  • The Org.AI Foundation's new mark is in the header, inlined so it follows the light and dark themes, and served as /org-ai.svg. favicon.ico, icon.svg and a 180 px apple-icon use Next.js's file conventions.
  • The broken 404 button is removed. The docs are the site's root, which "Go Home" already reaches.

Worth a look: committed .js copies of .tsx files

site/ has 14 compiled .js files committed next to their .tsx sources (lib/layout.shared.js, app/layout.js, app/not-found.js, …). Next.js resolves .js before .tsx when importing, so the .js copies are what runs, and an edit to only the .tsx silently does nothing. This PR changes both copies of the two files it touches. Deleting the .js copies, if nothing generates them on purpose, would remove the trap.

Checked

Built with OpenNext and run under Wrangler locally:

  • no __name left in the page;
  • the icons are linked and served;
  • all 164 pages load with no console errors and without sideways scrolling, at 1280 and 390 px.

Deploying

Not deployed. The site deploys by hand (cd site && pnpm deploy), and main may hold other unreleased work, so whoever usually releases it should deploy it.

🤖 Generated with Claude Code

bryant22 and others added 4 commits October 9, 2026 13:07
…d a broken 404 link

- Theme script: every page threw "ReferenceError: __name is not defined"
  before paint, so a visitor's saved light/dark theme was not applied up
  front. next-themes inlines its script from the function's source text, and
  Wrangler's default keep_names inserts __name() calls into it, which the
  browser does not have. wrangler.jsonc now sets "keep_names": false.
- The Org.AI Foundation's new mark in the header (inline, so it follows the
  light and dark themes) and as /org-ai.svg; favicon.ico, icon.svg and a
  180 px apple-icon (there was no favicon; /favicon.ico was a 404).
- The 404 page's "Documentation" button went to /docs, which does not exist
  (the docs are the site's root, which "Go Home" already reaches); removed.

lib/layout.shared and app/not-found are changed in both their .tsx and the
committed .js copies: Next.js resolves .js before .tsx, so the .js files are
the ones that run.

Built with OpenNext and run under Wrangler locally: no __name left in the
page, the icons are served, and all 164 pages load with no console errors
and without sideways scrolling at 1280 and 390 px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The docs now look like the Foundation's other sites (foundation.org.ai,
schema.org.ai, standards.org.ai):

- Fumadocs' colour variables take the Foundation's oklch tokens as they
  are: the warm ground, the ink greys, the amber accent for where you are.
  The sidebar, which Fumadocs tints apart, takes the same.
- Public Sans, the Foundation's typeface, served from this site with
  next/font/local, in place of Inter from Google Fonts.
- Dark only, as every Foundation site is: the theme is forced dark and the
  theme switch is gone, which also means no theme script can flash a wrong
  theme before paint.
- Headings set light with tight tracking, as on foundation.org.ai.

Changed in both the .tsx sources and the committed .js copies, which are
the ones Next.js runs.

Checked: OpenNext build under Wrangler, then all 164 pages at 1280 and
390 px with no console errors and no sideways scrolling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Prettier on global.css and layout.tsx (formatted on main before this
branch) and the new org-ai-mark.tsx. No other change. Files that were
already unformatted on main are left as they were.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The home page's title is the site's name, and the layout's "%s | Primitives.org.ai"
template turned it into "Primitives.org.ai | Primitives.org.ai". It now skips the
template; every other page keeps it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryant22
bryant22 merged commit ff3be3b into main Oct 11, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant