Static Files
Serve images, logos, fonts, and downloads from the public/ folder.
Static Files
Anything you drop into the public/ folder is copied to the root of your built site. Use it for images, logos, favicons, fonts, OpenGraph cards, PDFs, and any other static asset your docs need to reference.
How it works
At build time, cmdocs walks your public/ directory and copies every file into the static output. Reference any file with an absolute path starting with / — that path resolves to the same file in dev and in production.
Project layout
Always reference assets with an absolute path (/og-image.png), not a relative one (./public/og-image.png). The public/ prefix is dropped at build time.
Adding an image
Drop the file into public/
Place your image anywhere under public/. Sub-folders are preserved:
cp ~/Downloads/diagram.png my-docs/public/images/diagram.pngReference it with an absolute path
Use either Markdown or an <img> tag — both work, and both get automatic zoom on click:
Save and reload
The dev server picks it up immediately. In production, the file is served from the root of your site.
Reference styles

<img src="/og-image.png" alt="cmdocs OG image" />
<img
src="/logo/light.svg"
alt="cmdocs logo"
width="160"
height="40"
/>All images — Markdown or <img> — are wrapped in a zoomable viewer. Click any image to expand it.
Recommended file types
Prop
Type
Common locations
| Asset | Conventional path | Referenced from |
|---|---|---|
| Favicon | /public/logo/light-logo-only.svg | docs.json → favicon |
| Navbar logo (light) | /public/logo/light.svg | docs.json → navbar.logo.light |
| Navbar logo (dark) | /public/logo/dark.svg | docs.json → navbar.logo.dark |
| OpenGraph image | /public/og-image.png | docs.json → seo.ogImage |
| Page images | /public/images/* | MDX pages |
FAQ
What's next
How is this guide?