Liquidity Docs

Adding a new app's docs

How to add documentation for a new app to this site so it shows up as its own option in the sidebar.

This is a Next.js + MDX documentation site. Each app's docs live under content/docs/<app>/ as MDX. Adding a new app shows it as its own selectable section (a root folder) in the sidebar.

1. Create the app's folder

content/docs/<app>/
  index.mdx        # the section landing page
  overview.mdx     # any number of pages
  api.mdx
  meta.json        # title + ordering (see below)

Every page is an MDX file with frontmatter:

---
title: "Page Title"
description: "One line shown under the title and in search."
---

Your markdown/MDX content here.

index.mdx becomes the folder's landing page (route /docs/<app>).

2. Make it a sidebar option (root folder)

Add a meta.json to the app folder with "root": true. That turns the folder into a root folder, which the site renders as a switchable option in the sidebar (the "sidebar tabs" selector) - exactly how Transfer Agent and Liquid IAM appear.

{
  "title": "My App",
  "root": true,
  "pages": ["index", "overview", "api"]
}
  • title - the label shown in the sidebar selector.
  • pages - the order of pages/subfolders. Use "---Group Name---" entries to add section separators, and a subfolder name to nest a group.
  • Omit "root": true if you want the app to be a nested collapsible group under another section instead of its own top-level option.

Then add the folder to the root ordering in content/docs/meta.json:

{ "pages": ["index", "authoring", "transfer-agent", "liquid-iam", "my-app"] }
  • Internal links: use absolute doc routes, e.g. [Overview](/docs/my-app/overview).
  • Static files (an OpenAPI spec, images): put them in public/ and link with a root-absolute path, e.g. public/my-app.openapi.yaml -> /my-app.openapi.yaml.
  • MDX gotcha: outside code fences/backticks, a literal < starts a JSX tag and { starts an expression. Wrap such tokens in backticks or escape them (&lt;, &#123;).

4. Nested API reference (optional)

For an API section, nest a subfolder:

content/docs/my-app/api/
  meta.json        # { "title": "API Reference", "pages": ["endpoints"] }
  endpoints.mdx

and list "api" in the app's pages.

5. Preview & validate

npm install     # first time (generates .source)
npm run dev     # preview at /docs
npm run build   # validates all MDX + navigation

New/renamed files are picked up automatically in dev.

Note: lib/source.ts includes a small compatibility shim (it normalizes the MDX source files shape for the content loader). You do not need to touch it when adding docs.