Octri

docs nav

Your navigation, home page and redirects are one draft, as in API Studio. On its own, this command prints each top-bar tab with how many folders or rows it holds, and says if a draft is waiting. Add --json for the full structure, which is also the file set reads. See navigation.

bash
octri docs nav [show | set <file.json> | publish]

octri docs nav set <file.json>

Replaces the whole navigation draft with a file. It doesn't merge, so a tab missing from the file is removed from the draft. If the file matches what's live, it says so and nothing is pending.

Arguments

<file.json>pathrequired

A JSON array of tabs, or what octri docs nav --json prints.

octri docs nav publish

Sends the draft live: navigation, home page and redirects together.

Examples

Show the navigation

bash
octri docs nav
Output
āœ” Loading navigation

Navigation
  No tabs configured.

Edit the navigation as a file

bash
octri docs nav --json > nav.json
# edit nav.json
octri docs nav set nav.json
octri docs nav publish