Repository navigation
Site: the new Org.AI mark and favicons; fix the theme-script error and a broken 404 link - #50
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong on primitives.org.ai
ReferenceError: __name is not definedwhile loading, so a visitor's saved light or dark theme wasn't applied before the page painted./favicon.icowas a 404), and the old .org.ai logo./docs, which doesn't exist.The fix
site/wrangler.jsoncnow sets"keep_names": false. next-themes inlines its script from the function's source text, and Wrangler's defaultkeep_namesinserts__name()calls into that text, which the browser doesn't have./org-ai.svg.favicon.ico,icon.svgand a 180 pxapple-iconuse Next.js's file conventions.Worth a look: committed
.jscopies of.tsxfilessite/has 14 compiled.jsfiles committed next to their.tsxsources (lib/layout.shared.js,app/layout.js,app/not-found.js, …). Next.js resolves.jsbefore.tsxwhen importing, so the.jscopies are what runs, and an edit to only the.tsxsilently does nothing. This PR changes both copies of the two files it touches. Deleting the.jscopies, if nothing generates them on purpose, would remove the trap.Checked
Built with OpenNext and run under Wrangler locally:
__nameleft in the page;Deploying
Not deployed. The site deploys by hand (
cd site && pnpm deploy), andmainmay hold other unreleased work, so whoever usually releases it should deploy it.🤖 Generated with Claude Code