Skip to content

Commit b65127b

Browse files
devin-ai-integration[bot]fern-supportbot_apkdevalog
authored
Clarify that hidden API endpoints are automatically noindexed (#4575)
Co-authored-by: fern-support <support@buildwithfern.com> Co-authored-by: bot_apk <apk@cognition.ai> Co-authored-by: Devin Logan <devinannlogan@gmail.com>
1 parent 953e21a commit b65127b

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

fern/products/docs/pages/api-references/customize-api-ref.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ To customize the display of an endpoint, you can add a `title`. You can also use
256256

257257
### Hiding endpoints
258258

259-
You can hide an endpoint from the API Reference by setting `hidden` to `true`. The endpoint will still be accessible at its URL.
259+
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).
260260

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

532532
<ParamField path="api-name" toc={true} type="string">
533-
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.
533+
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.
534534

535535
</ParamField>

fern/products/docs/pages/navigation/hiding-content.mdx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Hiding content in your site
44

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

7-
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).
7+
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).
88

99
## Hiding a page
1010

@@ -79,3 +79,18 @@ versions:
7979
</Tab>
8080
</Tabs>
8181

82+
## Hiding an API endpoint
83+
84+
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`.
85+
86+
```yaml title="docs.yml" {6}
87+
navigation:
88+
- api: API Reference
89+
layout:
90+
- plants:
91+
- endpoint: POST /plants/{plantId}
92+
hidden: true
93+
```
94+
95+
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).
96+

0 commit comments

Comments
 (0)