Skip to main content

Writing Content

Add a page​

  1. Create the file

    Add docs/user-manuals/uc2/my-page.mdx (or any section folder) with front matter:

    docs/user-manuals/uc2/my-page.mdx
    ---
    id: my-page
    title: My Page
    description: One-line summary used in search results and link previews.
    ---

    Your content here.
  2. Register it in the sidebar

    Open sidebars.ts and add 'user-manuals/uc2/my-page' to the list (or to a category's items).

  3. Preview

    Run npm start. The page appears instantly; search is rebuilt on npm run build.

Search index

The offline search index is generated during npm run build. In npm start (dev mode) the search box is visible but returns results only after you have built and served the site once with npm run build && npm run serve.

Adding real screenshots​

Put the image in static/img/ and pass src to the component:

<Screenshot n={3} src="/img/fig3-scenario-settings.png" caption="Scenario Settings panel" />

Change colours and fonts​

All design tokens are at the top of src/css/custom.css. Change --ifm-color-primary (and its shades) for the light theme and the block under [data-theme='dark'] for the dark theme.

Add a global component​

  1. Create src/components/MyThing.tsx (and an optional MyThing.module.css).
  2. Register it in src/theme/MDXComponents.tsx.
  3. Use <MyThing /> in any .mdx file.

Change the logo and favicon​

Replace static/img/logo.svg and static/img/favicon.svg.