Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ To customize the display of an endpoint, you can add a `title`. You can also use

### Hiding endpoints

You can hide an endpoint from the API Reference by setting `hidden` to `true`. The endpoint will still be accessible at its URL.
You can hide an endpoint from the API Reference by setting `hidden` to `true`. The endpoint will still be accessible at its URL but is automatically excluded from search engine indexing (`noindex`), so [you don't need to set `noindex`](/learn/docs/customization/hiding-content#hiding-an-api-endpoint).

<Tabs>
<Tab title="OpenAPI">
Expand Down Expand Up @@ -530,6 +530,6 @@ The following properties can be set on the `- api` entry in your `docs.yml` navi
</ParamField>

<ParamField path="api-name" toc={true} type="string">
Only used when your project has [multiple APIs](/learn/docs/api-references/generate-api-ref#include-more-than-one-api-reference). The value must match the folder name containing the API definition. Do not set this property if you only have a single API, as it will cause errors.
Only used when your project has [multiple APIs](/learn/docs/api-references/generate-api-ref#include-more-than-one-api-reference). The value must match the folder name containing the API definition. Don't set this property if you only have a single API, as it will cause errors.

</ParamField>
17 changes: 16 additions & 1 deletion fern/products/docs/pages/navigation/hiding-content.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Hiding content in your site

<Markdown src="/snippets/agent-directive.mdx"/>

Fern provides two settings for hiding content: `hidden: true` (set in `docs.yml`) removes pages, sections, or versions from the sidebar, and `noindex: true` (set in [page frontmatter](/learn/docs/configuration/page-level-settings#noindex)) removes pages from search engines and [llms.txt](/learn/docs/ai-features/llms-txt).
Fern provides two settings for hiding content: `hidden: true` (set in `docs.yml`) removes pages, sections, versions, and endpoints from the sidebar, and `noindex: true` (set in [page frontmatter](/learn/docs/configuration/page-level-settings#noindex)) removes pages from search engines and [llms.txt](/learn/docs/ai-features/llms-txt).

## Hiding a page

Expand Down Expand Up @@ -79,3 +79,18 @@ versions:
</Tab>
</Tabs>

## Hiding an API endpoint

You can hide individual API endpoints from the sidebar by setting `hidden: true` in the endpoint's layout configuration in `docs.yml`. Hidden endpoints are automatically excluded from search engine indexing so there's no need to set `noindex: true`.

```yaml title="docs.yml" {6}
navigation:
- api: API Reference
layout:
- plants:
- endpoint: POST /plants/{plantId}
hidden: true
```

For full configuration details including examples for OpenAPI, Fern Definition, WebSocket, and GraphQL endpoints, see [Hiding endpoints](/learn/docs/api-references/customize-api-reference-layout#hiding-endpoints).

Loading