Skip to content

Commit

Permalink
describe default language
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-support committed Dec 8, 2024
1 parent 43ae0f0 commit 625f940
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fern/pages/docs/getting-started/global-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ favicon: path/to/favicon.ico
`landing-page` configuration [here](/learn/docs/getting-started/global-configuration#landing-page-configuration).
</ParamField>

<ParamField path="default-language" type="string" required={false}>
Sets the default language displayed by code snippets in the API Reference.

Options include: `typescript`, `python`, `java`, `go`, `ruby`, `csharp`, `curl`
</ParamField>

## Instances configuration

An `instance` is the backend of a distinct docs website. Each instance is published to a unique domain using the `--instance` flag. It is most common to use instances to configure staging and production docs which publish to separate URLs.
Expand Down
16 changes: 16 additions & 0 deletions fern/pages/fern-docs/config/sdk-snippets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,22 @@ navigation:
As the final step, trigger your docs generation by running `fern generate --docs` locally or in CI/CD (i.e., GitHub Actions). The SDK snippets will now appear via a drop-down!

### Set default snippet

To set the default snippet shown in the API Reference drop-down, specify the `default-language` in your `docs.yml`.

<CodeBlock title="docs.yml">
```yaml {1}
default-language: typescript
navigation:
- api: API Reference
snippets:
python: your-package-name
typescript: your-package-name
```
</CodeBlock>

## Language support

TypeScript, Python, Go, and Ruby are the supported SDK code snippet languages. Our development work is driven by customer requests, so please request support for another language by [opening an issue](https://github.com/fern-api/fern/issues/new/choose).
Expand Down

0 comments on commit 625f940

Please sign in to comment.