Typemark Documentation

Navigation

Organize your sidebar with tabs, groups, and pages, and decide which pages get published.

Uuendatud 19. nov 20262 min lugemist

The navigation key in typemark.json decides which pages your site publishes and in what order they appear. A page that isn't listed in navigation isn't published.

Structure

Navigation has three levels: tabs, groups, and pages.

"navigation": {
  "tabs": [
    {
      "tab": "Documentation",
      "groups": [
        { "group": "Getting started", "pages": ["introduction", "quickstart"] },
        { "group": "Guides", "pages": ["guides/authentication", "guides/deployment"] }
      ]
    }
  ]
}
  • Tabs split your site into sections. With more than one tab, they appear in the site header and the sidebar shows the active tab's groups.
  • Groups are headed sections in the sidebar. A group with no published pages is left out.
  • Pages are references to files, listed in the order they appear.

Page references

Each entry in pages is a file path without the extension. Typemark looks for .mdx first, then .md.

ReferenceFile
"introduction"introduction.mdx or introduction.md
"guides/authentication"guides/authentication.mdx or guides/authentication.md

The reference is also the page's URL path: guides/authentication is served at /guides/authentication.

If your pages live in a subfolder, set docs_root and references resolve inside it.

What gets published

  • Listed pages are published, appear in the sidebar, and get previous and next links in navigation order.
  • Files not in navigation aren't published. Add them to a group to put them on your site.
  • The first page of the first group in the first tab is your landing page.
  • Translations aren't listed. A page's translations, such as fr/quickstart.mdx, are published with it, in the same place in navigation. See Languages.

To unlist a page, add hidden: true to its frontmatter. It still opens at its URL, but it's left out of the sidebar, previous and next links, search, the sitemap, llms.txt, llms-full.txt, and the MCP server, and it gets a noindex tag. If your first page is hidden, the landing page is the first listed one.

Multiple tabs

"navigation": {
  "tabs": [
    {
      "tab": "Documentation",
      "groups": [
        { "group": "Getting started", "pages": ["introduction", "quickstart"] }
      ]
    },
    {
      "tab": "Changelog",
      "groups": [
        { "group": "Releases", "pages": ["changelog/v2", "changelog/v1"] }
      ]
    }
  ]
}

API reference from an OpenAPI spec

Use a source object instead of a page reference to generate API pages from an OpenAPI spec (JSON or YAML):

{
  "group": "Endpoints",
  "pages": [
    "api-reference/overview",
    { "source": "api-reference/openapi.json" }
  ]
}

Typemark generates an overview page in that group, plus one page per endpoint, grouped in the sidebar by the endpoint's first tag. The source path is relative to the repository root. You can also upload a spec in Settings > API reference, which adds the entry for you.

Editing navigation

Open the Navigation tab in the editor's sidebar. Drag pages to reorder them or move them between groups, and add, rename, or delete groups. Changes save straight to typemark.json.

Deleting a group unlinks its pages from navigation, which takes them off your site. The files stay in your repo.

Edit the pages arrays. The order in the array is the order in the sidebar.

"pages": ["quickstart", "introduction"]

New pages you create in the editor are added to navigation automatically.