Skip to content

Pin every endpoint's documentation URL, and fix the orange dark mode - #111

Open
leowilkin wants to merge 2 commits into
mainfrom
pin-docs-urls
Open

Pin every endpoint's documentation URL, and fix the orange dark mode#111
leowilkin wants to merge 2 commits into
mainfrom
pin-docs-urls

Conversation

@leowilkin

Copy link
Copy Markdown
Member

Two fixes to the docs config, one commit each.

Pin every endpoint's documentation URL

Mintlify derives an endpoint page's URL from the operation's tag and summary. That quietly makes summaries load-bearing: retitling "Create a mobile token" moves its page and 404s every link to it. Nothing in the spec said so, and the document has no operationIds either — so summaries were the only thing holding 36 URLs up.

Each operation now pins its own with x-mint.href:

  /session:
    post:
      tags: [Authentication]
      summary: Create a mobile token
      x-mint:
        href: /api-reference/authentication/create-a-mobile-token

The values were generated from the summaries as they stood, then verified against the live site before landing — all 36 returned 200, so this freezes today's paths rather than moving them. There's a comment above paths: explaining the convention where someone editing the file will actually meet it.

Pinning is only worth anything if it holds for endpoints added later, so two specs enforce it:

  • every operation carries an x-mint.href
  • no two operations claim the same one (a collision means the second page silently wins)

Both were mutation-tested — dropping a pin and duplicating an href each fail the suite, so they're not tests that can only pass.

Stop the docs rendering orange in dark mode

colors.light is the accent Mintlify uses in dark mode, and colors.dark the accent in light mode — not a lighter and darker shade of one brand colour, which is how I read them when I wrote the original docs.json. Hack Club orange went into the light slot, so dark mode came out orange throughout.

Now a lighter red, so the accent reads as Hack Club red in both modes:

colour contrast
dark-mode accent #ff6b7d 7.0:1 on near-black
light-mode accent #d42f46 4.9:1 on white

Both clear AA.

https://claude.ai/code/session_01PtsTSgKVNFXJiUEErUbA6h

Mintlify derives an endpoint page's URL from the operation's tag and summary,
which quietly makes summaries load-bearing: retitling "Create a mobile token"
moves its page and 404s every link to it. Nothing in the spec said so, and the
document has no operationIds either, so summaries were the only thing holding
36 URLs up.

Pin each one with `x-mint.href` instead. The values were generated from the
summaries as they stood and verified against the live site before landing, so
all 36 match the URLs already in the wild — this freezes today's paths rather
than moving them.

Pinning is only worth anything if it holds for endpoints added later, so two
specs enforce it: every operation carries an href, and no two operations claim
the same one. Both were mutation-tested — dropping a pin and duplicating an
href each fail the suite.

Claude-Session: https://claude.ai/code/session_01PtsTSgKVNFXJiUEErUbA6h
Mintlify's colors.light is the accent it uses in dark mode, and colors.dark the
accent in light mode — not a lighter and darker shade of one brand colour, which
is how I read them. Hack Club orange went into the light slot, so dark mode came
out orange throughout.

Use a lighter red instead, so the accent reads as Hack Club red in both modes.
It clears AA against a dark background at 7.0:1, and the light-mode accent stays
the darker red at 4.9:1 on white.

Claude-Session: https://claude.ai/code/session_01PtsTSgKVNFXJiUEErUbA6h
@mintlify

mintlify Bot commented Sep 4, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
attend 🟢 Ready View Preview Sep 4, 2026, 5:43 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

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