Skip to content

Commit

Permalink
feat(docs): Document the docs.yml lang server (#5802)
Browse files Browse the repository at this point in the history
  • Loading branch information
dannysheridan authored Jan 31, 2025
1 parent ad104e1 commit bd974c9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
7 changes: 6 additions & 1 deletion fern/pages/docs/building-your-docs/navigation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ description: Set up the navigation for your documentation site built with Fern D

## Use `docs.yml`

Every Fern Docs website has a special configuration file called `docs.yml`. Use this file to configure the navigation for your documentation site.
Every Fern Docs website has a special configuration file called `docs.yml`. Use this file to configure the navigation for your documentation site.

### Example Configuration

Here's a complete example of a `docs.yml` file:

<CodeBlock title="An example docs.yml">
```yaml
# yaml-language-server: $schema=https://schema.buildwithfern.dev/docs-yml.json
navigation:
- section: Home
contents:
Expand Down
16 changes: 11 additions & 5 deletions fern/pages/docs/getting-started/global-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@ title: "Global Configuration"
subtitle: "Customize your documentation using the docs.yml file"
---

<Note>
Not all of the properties in `docs.yml` are documented here. If you'd like to see all properties, please check out the
the raw [schema](https://github.com/fern-api/fern/blob/69e74d9c27dc031ec2e84e70b878c40e9e9678a5/packages/cli/configuration/fern/definition/docs.yml#L110-L153)
</Note>
### Editor Support

To enable intelligent YAML validation and autocompletion in your editor, add this line at the top of your `docs.yml` file:

```yaml docs.yml
# yaml-language-server: $schema=https://schema.buildwithfern.dev/docs-yml.json
```

This enables real-time schema validation and autocompletion based on our [complete schema](https://github.com/fern-api/fern/blob/09555d587294fd3dc77ceb35f21e8976a5a2b7a2/fern/apis/docs-yml/definition/docs.yml#L110).

## Top-level properties

Every Fern documentation website needs a `docs.yml` file with the core configuration settings.

```yaml docs.yml
# yaml-language-server: $schema=https://schema.buildwithfern.dev/docs-yml.json

title: My Docs

Expand All @@ -22,8 +28,8 @@ logo:
light: path/to/logo.png

favicon: path/to/favicon.ico

```
<ParamField path="title" type="string" required={false}>
A string that is used as the tab bar title.
</ParamField>
Expand Down

0 comments on commit bd974c9

Please sign in to comment.