- Documentation
- Customize your site
- Custom CSS and static files
Custom CSS and static files
Add your own styles with a custom.css file, and serve fonts and other static files from your docs folder.
Add a file named custom.css at the top of your docs folder, and Specly loads it on every page, after its own styles, so
your rules can override them.
.ed-banner { letter-spacing: 0.02em;}
.brand { font-family: "Brand Sans", system-ui, sans-serif;}Then use your own classes in a page:
Welcome to <span className="brand">your product</span>.Static files
Section titled “Static files”Any image, font, PDF, audio or video file in your docs folder is served at its path, so a font can be loaded from
custom.css:
@font-face { font-family: "Brand Sans"; src: url("/fonts/brand-sans.woff2") format("woff2"); font-weight: 400; font-display: swap;}That’s the file fonts/brand-sans.woff2 in your docs folder. Files in public/ are served from the root of your site
too. For the types Specly serves, and for what it leaves out, see Images and files.
Pages, docs.json and code files are never served as static files.