Logo
Set a custom logo in the navigation bar with the logo field in docslit.json. When no logo is configured, DocsLit looks for one in your project (see Automatic detection) and otherwise shows a generated monogram next to your site name.
One logo
Use a path string for a single image. It appears next to the site name:
Place the image file in your project root, or use a path relative to the project root. DocsLit copies it to the build output when you run docslit build. Common formats are SVG, PNG and WebP.
Light and dark logos
A logo that works on a light background rarely works on a dark one. Give the object form a variant for each mode, and DocsLit swaps them when the reader changes mode:
light and dark, it is used in both modes.Docs.With the object form, the image is treated as a wordmark: the site name is not repeated beside it. Include your name in the image, or add it with text.
Automatic detection
When logo or favicon isn't set in docslit.json, DocsLit looks for the files in the project root first, then in docs/assets/, assets/, public/ and images/:
| Brand asset | File names |
|---|---|
| Favicon | favicon.svg, favicon.ico, favicon.png |
| Logo | logo.svg, logo.png |
| Dark-mode logo | logo-dark.svg or logo-dark.png, next to the logo |
Explicit config always wins over detection.
Monogram favicon
If no favicon is configured or found, the build writes a favicon.svg: the first letter of the site name in white on a rounded square in your theme's accent color. When the accent isn't a hex color, the square is #111827. The monogram is also the nav logo when you have no logo.
Paths and URLs
A path that starts with / is treated as a site-root path, for example when the file is already in your output or served from a CDN. Full http and https URLs are used as they are, and DocsLit does not copy them.
docslit validate reports a logo object that has no light, dark or text as logo-invalid.
Next steps
- Add a site-wide announcement banner for product updates
- Choose colors and fonts in Palettes and brand colors
- Set up the header and footer in Site chrome