- Documentation
- Customize your site
- Theme and fonts
Theme and fonts
Set your colours, background, fonts and light and dark modes in the dashboard, or match them to your product, with a contrast check before anything goes live.
Open Theme in the dashboard to change how your site looks. The preview beside the controls is your own docs. Choose Commit theme.json to save, and Specly commits the file to your repo, so the repo stays the source of truth. The site rebuilds and switches over once the build passes.
If your published branch only takes pull requests, Specly opens one with the theme instead, and the site rebuilds once it merges. Discard drops your changes, and What Save commits shows the diff first.
Colours and fonts
Section titled “Colours and fonts”Theme › Colours and fonts has seven cards.
Theme › Colours and fonts › Match your product reads your product’s website and fills in the other cards from it,
so your docs look like your product. Enter its address, such as yourcompany.com, and choose Match. Specly shows
what it found: your brand colour and where it came from, your light and dark backgrounds, your fonts, and whether your
product has a dark mode. Choose Use these to fill them in, change anything you like, then commit as usual.
Undo puts back the theme you had, and nothing is saved until you commit.
Specly reads the page and its stylesheets the way a browser would, so it only sees what a visitor sees: a page behind a sign-in shows it the sign-in page. Fonts come from Google Fonts, so when your product uses a font Google doesn’t have, Specly uses the closest one it does and says which. A brand colour too light or too dark for text keeps its exact shade where it’s readable and moves to the nearest readable shade where it isn’t.
Look picks the layout: Editorial, serif text on paper like a book, or Product, sans-serif text on white like product docs. Each starts from its own colours and fonts, and the cards below change them. The preview shows the new colours and fonts at once; the layout itself changes when the site rebuilds. See Look.
Light and dark sets which modes your site offers: Light only, Dark only or Both, reader picks.
Accent colours links, the drop cap and the current page. Second accent colours chapter labels. Pick a swatch, or
type any colour as a six-digit hex such as #2b3a8c. Under each, Specly shows the contrast on light and dark pages, for
example “#2f47c5 is 6.8:1 on light pages and 7.3:1 on dark pages,” for the default accent.
Background is Paper (the default, warm with a light grain), Warm, Cool, Gradient or Image. A
gradient takes a CSS gradient. An image takes a path to a file in public/, and saving checks it’s there. Both show
as a band across the top of every page, under the header. No text sits on the band, so text stays readable.
Fonts picks Headings, Body, Interface and Code fonts from a short list. Fonts come from Google Fonts, and Specly downloads them into your site at build time.
Contrast is checked
Section titled “Contrast is checked”Text on your background needs a contrast ratio of 4.5:1 (WCAG AA). If a colour falls short, the card says so, names the ratio, and offers a button, Use a colour and its ratio, to move to the nearest colour that passes. While the theme fails, saving is off, because the build would stop. Pick a passing colour to turn it back on.
A single accent that fails on dark pages is lightened for them automatically, and the card says “Lightened to … for dark pages, automatically.”
Pages and checks
Section titled “Pages and checks”Theme › Pages and checks sets:
- Chapter numbers: the small number over each page title. Guide tabs only (not API or reference), Every tab or None.
- Pull request numbers: whether a page’s “what changed” names the pull request. See Freshness.
- Broken links in a build: Stop the build keeps a broken page from going live, and Only report them doesn’t. The default stops the build, or only reports for a site that came from Mintlify.
- A banner across every page: a line of text across the top, with Markdown links allowed. Tick Readers can close it to let readers dismiss it.
The file
Section titled “The file”The dashboard writes theme.json in your docs folder. You can edit it yourself, in the editor or in your repo, and the
dashboard reads it back. Every key is in the theme.json reference.
Your colours can also come from docs.json: its colors.primary and colors.light fill in the accents when
theme.json has none, moved to pass contrast if they need it. See Logo, navbar, footer and banner.