Skip to content

Commit

Permalink
chore(docs): document audiences for docs (#5309)
Browse files Browse the repository at this point in the history
* document audiences in docs

* Update audiences.mdx

Add schematic example link

---------

Co-authored-by: fern-bot <[email protected]>
Co-authored-by: Danny Sheridan <[email protected]>
  • Loading branch information
3 people authored Dec 2, 2024
1 parent 65f193d commit 72b9afe
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,9 @@ navigation:
- page: Endpoint Errors
icon: fa-regular fa-exclamation-triangle
path: ./pages/fern-docs/config/endpoint-errors.mdx
- page: Audiences
icon: fa-duotone fa-users
path: ./pages/fern-docs/config/audiences.mdx
- page: Customize API Reference Layout
icon: fa-regular fa-arrow-up-arrow-down
path: ./pages/fern-docs/content/customize-api-ref.mdx
Expand Down
20 changes: 20 additions & 0 deletions fern/pages/fern-docs/config/audiences.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Audiences
subtitle: Use audiences to filter the endpoints, schemas, and properties that are displayed in your API Reference.
---

Audiences are a useful tool for segmenting your API for different consumers. Common examples of audiences include `public`
and `beta`. You can configure audiences in both [the OpenAPI Specification](/learn/api-definition/openapi/audiences) as well as [the Fern Definition](/learn/api-definition/fern/audiences).

Once you've added audiences to your API Specification, you can filter to that audience by adding the `audience` property to the `api` object in your `docs.yml` navigation.

<CodeBlocks>
```yaml title="docs.yml" {3-4}
navigation:
- api: API Reference
audiences:
- public
```
</CodeBlocks>
Here's [an example from Schematic](https://github.com/SchematicHQ/schematic-fern-config/blob/e19f5ea69a343727ed018e79127bf4fd20ad0f7b/fern/docs.yml#L128-L129) in production.

0 comments on commit 72b9afe

Please sign in to comment.