diff --git a/fern/products/docs/pages/api-references/customize-api-ref.mdx b/fern/products/docs/pages/api-references/customize-api-ref.mdx index 12d1207c4..574e6519a 100644 --- a/fern/products/docs/pages/api-references/customize-api-ref.mdx +++ b/fern/products/docs/pages/api-references/customize-api-ref.mdx @@ -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). @@ -530,6 +530,6 @@ The following properties can be set on the `- api` entry in your `docs.yml` navi - 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. diff --git a/fern/products/docs/pages/navigation/hiding-content.mdx b/fern/products/docs/pages/navigation/hiding-content.mdx index b70b3d807..a0d79c0f6 100644 --- a/fern/products/docs/pages/navigation/hiding-content.mdx +++ b/fern/products/docs/pages/navigation/hiding-content.mdx @@ -4,7 +4,7 @@ title: Hiding content in your site -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 @@ -79,3 +79,18 @@ versions: +## 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). +