-
Notifications
You must be signed in to change notification settings - Fork 7
Add navigation overview page #6456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
fern-api
wants to merge
5
commits into
main
Choose a base branch
from
fern/navigation-overview
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d72d887
Add navigation overview page
fern-api[bot] e198658
Slim configuration overview and move page-level settings above naviga…
fern-api[bot] cff9d3a
Connect the configuration overview cards with framing text
fern-api[bot] 3b25f09
small edits
devalog 6b46f58
edits
devalog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
fern/products/docs/pages/navigation/navigation-overview.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| --- | ||
| title: Navigation overview | ||
| subtitle: Understand the layers that make up your site's navigation | ||
| description: Understand how pages, folders, sections, tabs, versions, and products fit together to form the navigation of a Fern documentation site. | ||
| --- | ||
|
|
||
| Your site's navigation is defined under the `navigation` key of `docs.yml`. Navigation is built from nested layers, ordered from narrowest to broadest: pages, sections, tabs, versions, and products. | ||
|
|
||
| ## Navigation layers | ||
|
|
||
| <CardGroup cols={2}> | ||
| <Card title="Sections, pages, and folders" icon="fa-duotone fa-bars" href="/learn/docs/configuration/navigation"> | ||
| The sidebar itself: grouped, nestable entries pointing at Markdown files | ||
| </Card> | ||
| <Card title="Tabs and tab variants" icon="fa-duotone fa-folder-open" href="/learn/docs/configuration/tabs"> | ||
| A top-level row that splits one product or version into parallel bodies of content | ||
| </Card> | ||
| <Card title="Versions" icon="fa-duotone fa-code-branch" href="/learn/docs/configuration/versions"> | ||
| A dropdown for multiple releases of the same content, each with its own structure | ||
| </Card> | ||
| <Card title="Products" icon="fa-duotone fa-grid-2" href="/learn/docs/configuration/products"> | ||
| A switcher for distinct offerings, each with its own navigation, tabs, and versions | ||
| </Card> | ||
| </CardGroup> | ||
|
|
||
| Each navigation layer is optional, and each one adds a segment to your page URLs unless you [skip its slug](/learn/docs/seo/configuring-slugs). You can use these layers individually or in combination with each other. Outer layers wrap inner ones: a product contains versions, a version contains tabs, and a tab contains sections. | ||
|
|
||
| ```yaml docs.yml | ||
| products: | ||
| - display-name: Product A | ||
| path: ./products/product-a/product-a.yml | ||
| ``` | ||
|
|
||
| ```yaml product-a.yml | ||
| tabs: | ||
| guides: | ||
| display-name: Guides | ||
| navigation: | ||
| - tab: guides | ||
| layout: | ||
| - section: Get started | ||
| contents: | ||
| - page: Quickstart | ||
| path: ./pages/quickstart.mdx | ||
| ``` | ||
|
|
||
| Which files hold the `navigation` key depends on the layers you use. Unversioned single-product sites keep it in `docs.yml`; products and versions each move it into their own `.yml` file. [Project structure](/learn/docs/getting-started/project-structure) shows the resulting file layouts. | ||
|
|
||
| ## Sidebar entry types | ||
|
|
||
| Inside a section's `contents`, each entry is one of the following types. | ||
|
|
||
| | Entry | Renders | Reference | | ||
| |-------|---------|-----------| | ||
| | `page` | A single Markdown or MDX file | [Add a page](/learn/docs/configuration/navigation#add-a-page) | | ||
| | `folder` | Every file in a directory, auto-titled and auto-sorted | [Add a folder](/learn/docs/configuration/navigation#add-a-folder) | | ||
| | `section` | A group of nested entries, optionally with its own overview page | [Add a section](/learn/docs/configuration/navigation#add-a-section) | | ||
| | `api` | A generated API Reference | [API References](/learn/docs/api-references/overview) | | ||
| | `changelog` | A dated timeline of release entries | [Changelog pages](/learn/docs/configuration/changelogs) | | ||
| | `link` | An external URL in the sidebar | [Links](/learn/docs/configuration/navigation#links) | | ||
|
|
||
| ## Per-entry controls | ||
|
|
||
| These properties apply to individual navigation entries, regardless of which layer they sit under. | ||
|
|
||
| | Control | Effect | | ||
| |---------|--------| | ||
| | [`icon`](/learn/docs/configuration/navigation#sidebar-icons) | Adds a Font Awesome icon, image file, or inline SVG next to the entry | | ||
| | [`slug` and `skip-slug`](/learn/docs/seo/configuring-slugs) | Renames the entry's URL segment or drops it from the path | | ||
| | [`hidden`](/learn/docs/customization/hiding-content) | Keeps the entry out of the sidebar and search while leaving its URL reachable | | ||
| | [`availability`](/learn/docs/configuration/navigation#availability) | Marks lifecycle status with a badge, inherited by child entries | | ||
| | [`collapsed`](/learn/docs/configuration/navigation#collapsed-sections-or-folders) | Controls whether a section or folder starts collapsed | | ||
| | [`viewers`](/learn/docs/authentication/features/rbac) | Restricts the entry to readers holding a given role | | ||
|
|
||
| Individual pages can also override navigation-derived behavior from their own [frontmatter](/learn/docs/configuration/page-level-settings), including title, slug, and layout. | ||
|
|
||
| ## Beyond the sidebar | ||
|
|
||
| Navbar links, the logo, the footer, and site-wide layout are [site-level settings](/learn/docs/configuration/site-level-settings) rather than navigation entries. Search behavior across your navigation is covered in [search configuration](/learn/docs/customization/search). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 [vale] reported by reviewdog 🐶
[Microsoft.OxfordComma] Use the Oxford comma in ', with search and tag filtering built in.'.