Customizing the portal
A portal looks like your product without forking the framework. Each layer below has its own page; this one shows what goes where.
Brand and layout: rapidoc.config.yaml
Section titled “Brand and layout: rapidoc.config.yaml”| Change | Where |
|---|---|
| Accent color, light and dark mode, fonts | Theme |
| Logo (light and dark), favicon, link previews, announcement banner | Site |
| Header links, buttons, dropdowns and mega-menus | Header |
| Tabs and their sidebars, with icons and badges | Navigation |
| Call to action, link columns, newsletter sign-up, social links | Footer |
Analytics, site verification and other <head> tags |
Head tags |
From the one accent color, the portal derives its text and button variants so that accent text keeps 4.5:1 contrast in both themes.
Your own CSS
Section titled “Your own CSS”theme.css loads your stylesheets on every page, after the portal’s own, so plain selectors win. The portal’s CSS variables are the stable way in: corners, colors and spacing. See Your own CSS.
Components in guides
Section titled “Components in guides”- MDX: callouts, cards, tabs, steps, badges, buttons and icons, with no imports. See MDX.
- Your own components:
.mdxpages can import Astro components (.astro) from your project, such ascomponents/Hello.astro. See Your own components. - Markdoc: the same building blocks as tags, for pages that stay plain text. See Markdoc.
- Live API operations inside a guide, with Try. See Embedding operations.
- Arazzo workflows drawn as diagrams. See Workflows.
API reference pages
Section titled “API reference pages”Each reference page is rendered by the RapiDoc web component. The rapidoc key sets its attributes for every reference page: render style, schema style and expand level, Try and server selection, font size, and anything else in the RapiDoc API reference. See RapiDoc attributes.
Build scripts
Section titled “Build scripts”@rapidoc/portal builds, serves and checks portals from your own Node.js scripts: generate specs or pages before a build, or run several portals from one CI job. See Programmatic API.