diff --git a/fern/docs.yml b/fern/docs.yml index 69c4d529bd..25850155d5 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -697,6 +697,8 @@ redirects: destination: /learn/api-definitions/grpc/overview - source: /learn/grpc-definition/:slug* destination: /learn/api-definitions/grpc/:slug* + - source: /learn/api-definitions/protobuf + destination: /learn/api-definitions/grpc/overview # FernDef (specifics before catchall — comparison-with-open-api was shadowed) - source: /learn/api-definition/fern/comparison-with-open-api diff --git a/fern/products/api-def/ferndef/api-yml/global-configuration.mdx b/fern/products/api-def/ferndef/api-yml/global-configuration.mdx index 7d1c1bbef1..3b11febb8e 100644 --- a/fern/products/api-def/ferndef/api-yml/global-configuration.mdx +++ b/fern/products/api-def/ferndef/api-yml/global-configuration.mdx @@ -21,7 +21,7 @@ headers: ``` -When you define global headers in your `api.yml`, you must [include them in your endpoint examples](/api-definitions/ferndef/examples#examples-with-headers). +When you define global headers in your `api.yml`, you must [include them in your endpoint examples](/learn/api-definitions/ferndef/examples#examples-with-headers). ## Global path parameters diff --git a/fern/products/api-def/ferndef/auth.mdx b/fern/products/api-def/ferndef/auth.mdx index 1d1a1e9d5a..add3f91105 100644 --- a/fern/products/api-def/ferndef/auth.mdx +++ b/fern/products/api-def/ferndef/auth.mdx @@ -247,7 +247,7 @@ service: response: TokenResponse ``` -If your OAuth server is hosted at a different URL than your main API, you can use [multi-URL environments](/api-definitions/ferndef/api-yml/environments#multiple-urls-per-environment) to specify separate base URLs for authentication and API calls. +If your OAuth server is hosted at a different URL than your main API, you can use [multi-URL environments](/learn/api-definitions/ferndef/api-yml/environments#multiple-urls-per-environment) to specify separate base URLs for authentication and API calls. With this, all of the OAuth logic happens automatically in the generated SDKs. As long as you configure these settings, your client will automatically retrieve an access token and refresh it as needed. diff --git a/fern/products/api-def/ferndef/endpoints.mdx b/fern/products/api-def/ferndef/endpoints.mdx index 90e4b4df12..52395fc844 100644 --- a/fern/products/api-def/ferndef/endpoints.mdx +++ b/fern/products/api-def/ferndef/endpoints.mdx @@ -33,7 +33,7 @@ Each service defines: ### Section display name -By default, section names in your API Reference come from service file names (e.g., `user.yml` becomes "User"). To override the display name of a section, [use the `section` property in your `docs.yml`](/docs/api-references/customize-api-reference-layout#renaming-sections). +By default, section names in your API Reference come from service file names (e.g., `user.yml` becomes "User"). To override the display name of a section, [use the `section` property in your `docs.yml`](/learn/docs/api-references/customize-api-reference-layout#renaming-sections). ### SDK method names diff --git a/fern/products/api-def/ferndef/examples.mdx b/fern/products/api-def/ferndef/examples.mdx index fe8dca6b72..928c5ad273 100644 --- a/fern/products/api-def/ferndef/examples.mdx +++ b/fern/products/api-def/ferndef/examples.mdx @@ -321,7 +321,7 @@ errors: ### Examples with headers -When you have [global headers defined in your `api.yml`](/api-definitions/ferndef/api-yml/global-headers#global-headers), you must include them in your examples: +When you have [global headers defined in your `api.yml`](/learn/api-definitions/ferndef/api-yml/global-headers#global-headers), you must include them in your examples: ```yml {15-16} service: diff --git a/fern/products/api-def/ferndef/export-openapi.mdx b/fern/products/api-def/ferndef/export-openapi.mdx index 8adae6c3d1..52b3698989 100644 --- a/fern/products/api-def/ferndef/export-openapi.mdx +++ b/fern/products/api-def/ferndef/export-openapi.mdx @@ -7,16 +7,24 @@ noindex: true -To prevent lock-in to the Fern Definition format, you can export your API definition to OpenAPI 3.1 at any time [using the `fern export` command](/cli-api-reference/cli-reference/commands#fern-export). +To prevent lock-in to the Fern Definition format, you can export your API definition to OpenAPI 3.1 at any time [using the `fern export` command](/learn/cli-api-reference/cli-reference/commands#fern-export). -If you have multiple APIs defined in your `fern/apis/` folder, use `--api` to specify which API to export. +The path argument is the **output file** to write. Use a `.yml` or `.json` extension to choose the format of the generated spec. + + +```bash +# Write the exported spec as YAML +fern export path/to/openapi.yml - - ```bash - fern export path/to/openapi.yml - fern export path/to/openapi.json +# ...or as JSON +fern export path/to/openapi.json +``` + + +If you have multiple APIs defined in your `fern/apis/` folder, use `--api` to specify which API to export. - # Specify API to export - fern export --api public-api path/to/openapi.yml - ``` - \ No newline at end of file + +```bash +fern export --api public-api path/to/openapi.yml +``` + \ No newline at end of file diff --git a/fern/products/api-def/ferndef/webhooks.mdx b/fern/products/api-def/ferndef/webhooks.mdx index 8c26059d03..3eda5e8d4f 100644 --- a/fern/products/api-def/ferndef/webhooks.mdx +++ b/fern/products/api-def/ferndef/webhooks.mdx @@ -87,7 +87,7 @@ navigation: - subpackage_api.newPlantWebhook # Format: subpackage_{name-of-api}.{webhook-event-name} ``` -For more information on how to configure your webhook reference in `docs.yml`, see [Generate your webhook reference](/docs/api-references/generate-webhook-ref). +For more information on how to configure your webhook reference in `docs.yml`, see [Generate your webhook reference](/learn/docs/api-references/generate-webhook-ref). ## SDK signature verification diff --git a/fern/products/api-def/grpc/overview.mdx b/fern/products/api-def/grpc/overview.mdx index aa488f9e96..171a4e3834 100644 --- a/fern/products/api-def/grpc/overview.mdx +++ b/fern/products/api-def/grpc/overview.mdx @@ -202,7 +202,7 @@ fern/ ``` -Create a `generators.yml` file in your fern directory and add a reference to your gRPC proto files. See [gRPC generators.yml reference](/api-definitions/grpc/generators-yml-reference) for complete configuration options. +Create a `generators.yml` file in your fern directory and add a reference to your gRPC proto files. See [gRPC generators.yml reference](/learn/api-definitions/grpc/generators-yml-reference) for complete configuration options. ```yaml title="generators.yml" # Your API definition diff --git a/fern/products/api-def/openapi/automation.mdx b/fern/products/api-def/openapi/automation.mdx index 4bc80cf057..12baeaf86f 100644 --- a/fern/products/api-def/openapi/automation.mdx +++ b/fern/products/api-def/openapi/automation.mdx @@ -20,7 +20,7 @@ Automatically pull your latest OpenAPI spec from a publicly available URL into y ``` - Create `.github/workflows/sync-openapi.yml` in your repository. This action uses [`fern api update`](/cli-api-reference/cli-reference/commands#fern-api-update) to pull the latest version of your OpenAPI spec from the `origin` field in your `generators.yml` file. + Create `.github/workflows/sync-openapi.yml` in your repository. This action uses [`fern api update`](/learn/cli-api-reference/cli-reference/commands#fern-api-update) to pull the latest version of your OpenAPI spec from the `origin` field in your `generators.yml` file. ```yml title=".github/workflows/sync-openapi.yml" name: Sync OpenAPI Specs # can be customized diff --git a/fern/products/api-def/openapi/extensions/examples.mdx b/fern/products/api-def/openapi/extensions/examples.mdx index 3f915df5fb..b91794d77d 100644 --- a/fern/products/api-def/openapi/extensions/examples.mdx +++ b/fern/products/api-def/openapi/extensions/examples.mdx @@ -20,7 +20,7 @@ The `request` and `response` values use different shapes: - `response` requires a nested `body` key containing the response body properties. - Examples must include any headers declared with the [`x-fern-global-headers` extension](/api-definitions/openapi/extensions/global-headers). Place them under `headers` alongside `path-parameters` and `request`. + Examples must include any headers declared with the [`x-fern-global-headers` extension](/learn/api-definitions/openapi/extensions/global-headers). Place them under `headers` alongside `path-parameters` and `request`. An endpoint with path parameters: diff --git a/fern/products/api-def/openapi/extensions/global-headers.mdx b/fern/products/api-def/openapi/extensions/global-headers.mdx index d684a1b423..8871edb6a3 100644 --- a/fern/products/api-def/openapi/extensions/global-headers.mdx +++ b/fern/products/api-def/openapi/extensions/global-headers.mdx @@ -30,7 +30,7 @@ x-fern-global-headers: ``` - When you define global headers using `x-fern-global-headers`, you must [include them in your `x-fern-examples`](/api-definitions/openapi/extensions/request-response-examples). + When you define global headers using `x-fern-global-headers`, you must [include them in your `x-fern-examples`](/learn/api-definitions/openapi/extensions/request-response-examples). ### Default values diff --git a/fern/products/api-def/openapi/overview.mdx b/fern/products/api-def/openapi/overview.mdx index 880fdbe6c9..7632d02cae 100644 --- a/fern/products/api-def/openapi/overview.mdx +++ b/fern/products/api-def/openapi/overview.mdx @@ -106,8 +106,8 @@ components: Follow these best practices to ensure your OpenAPI specification generates high-quality SDKs and documentation: -- **Organize with proper project structure.** Follow the instructions at [Project structure](/api-definitions/overview/project-structure) to clearly organize the directories that contain your definition and other related files. -- **Add `operationId` to endpoints.** Include a clear `operationId` for each endpoint to control the function names generated in your SDKs. (Or use [extensions to customize group and method names](/api-definitions/openapi/extensions/method-names).) +- **Organize with proper project structure.** Follow the instructions at [Project structure](/learn/api-definitions/overview/project-structure) to clearly organize the directories that contain your definition and other related files. +- **Add `operationId` to endpoints.** Include a clear `operationId` for each endpoint to control the function names generated in your SDKs. (Or use [extensions to customize group and method names](/learn/api-definitions/openapi/extensions/method-names).) - **Reference schemas instead of inlining.** Define reusable schemas in the `components/schemas` section and reference them with `$ref`. This promotes consistency, reduces duplication, and makes maintenance easier. ```yaml title="openapi.yml" {8, 14, 17-25} @@ -137,7 +137,7 @@ Follow these best practices to ensure your OpenAPI specification generates high- enum: [available, pending, sold] ``` -- **Use overlays and Fern extensions for customization.** Customize your specification using Fern [extensions](/api-definitions/openapi/extensions/overview) housed in an [overlay file](/api-definitions/openapi/overlays). This lets you modify generation behavior without changing your core OpenAPI definition. +- **Use overlays and Fern extensions for customization.** Customize your specification using Fern [extensions](/learn/api-definitions/openapi/extensions/overview) housed in an [overlay file](/learn/api-definitions/openapi/overlays). This lets you modify generation behavior without changing your core OpenAPI definition. Once your OpenAPI spec follows these practices, you're ready to set up your fern folder. diff --git a/fern/products/api-def/openapi/webhooks.mdx b/fern/products/api-def/openapi/webhooks.mdx index 2aef5ec0d3..a874ce9d5c 100644 --- a/fern/products/api-def/openapi/webhooks.mdx +++ b/fern/products/api-def/openapi/webhooks.mdx @@ -124,7 +124,7 @@ navigation: - subpackage_plants.newPlantWebhook # subpackage_{tag}.{webhook-event-name} ``` -For more information on how to configure your webhook reference in `docs.yml`, see [Generate your webhook reference](/docs/api-references/generate-webhook-ref). +For more information on how to configure your webhook reference in `docs.yml`, see [Generate your webhook reference](/learn/docs/api-references/generate-webhook-ref). ## SDK signature verification diff --git a/fern/products/api-def/pages/asyncapi-empty.mdx b/fern/products/api-def/pages/asyncapi-empty.mdx index a56ad602d3..0ad721d94d 100644 --- a/fern/products/api-def/pages/asyncapi-empty.mdx +++ b/fern/products/api-def/pages/asyncapi-empty.mdx @@ -4,4 +4,4 @@ description: This is an empty page used to redirect to the AsyncAPI Definition p --- -This page is empty. Please visit the [AsyncAPI Definition](/api-definitions/asyncapi/overview) page for more information. \ No newline at end of file +This page is empty. Please visit the [AsyncAPI Definition](/learn/api-definitions/asyncapi/overview) page for more information. \ No newline at end of file diff --git a/fern/products/api-def/pages/ferndef-empty.mdx b/fern/products/api-def/pages/ferndef-empty.mdx index 64df46958e..caa4042a40 100644 --- a/fern/products/api-def/pages/ferndef-empty.mdx +++ b/fern/products/api-def/pages/ferndef-empty.mdx @@ -4,4 +4,4 @@ description: This is an empty page used to redirect to the Fern Definition pages --- -This page is empty. Please visit the [Fern Definition](/api-definitions/ferndef/overview) page for more information. \ No newline at end of file +This page is empty. Please visit the [Fern Definition](/learn/api-definitions/ferndef/overview) page for more information. \ No newline at end of file diff --git a/fern/products/api-def/pages/grpc-empty.mdx b/fern/products/api-def/pages/grpc-empty.mdx index 9b946b7524..2a6e15c06c 100644 --- a/fern/products/api-def/pages/grpc-empty.mdx +++ b/fern/products/api-def/pages/grpc-empty.mdx @@ -4,4 +4,4 @@ description: This is an empty page used to redirect to the gRPC Definition pages --- -This page is empty. Please visit the [gRPC Definition](/api-definitions/grpc/overview) page for more information. \ No newline at end of file +This page is empty. Please visit the [gRPC Definition](/learn/api-definitions/grpc/overview) page for more information. \ No newline at end of file diff --git a/fern/products/api-def/pages/openapi-empty.mdx b/fern/products/api-def/pages/openapi-empty.mdx index a943a88052..444f611d3a 100644 --- a/fern/products/api-def/pages/openapi-empty.mdx +++ b/fern/products/api-def/pages/openapi-empty.mdx @@ -4,4 +4,4 @@ description: This is an empty page used to redirect to the OpenAPI Definition pa --- -This page is empty. Please visit the [OpenAPI Definition](/api-definitions/openapi/overview) page for more information. \ No newline at end of file +This page is empty. Please visit the [OpenAPI Definition](/learn/api-definitions/openapi/overview) page for more information. \ No newline at end of file diff --git a/fern/products/api-def/pages/openrpc-empty.mdx b/fern/products/api-def/pages/openrpc-empty.mdx index b89f574008..d286131e06 100644 --- a/fern/products/api-def/pages/openrpc-empty.mdx +++ b/fern/products/api-def/pages/openrpc-empty.mdx @@ -4,4 +4,4 @@ description: This is an empty page used to redirect to the OpenRPC Definition pa --- -This page is empty. Please visit the [OpenRPC Definition](/api-definitions/openrpc/overview) page for more information. \ No newline at end of file +This page is empty. Please visit the [OpenRPC Definition](/learn/api-definitions/openrpc/overview) page for more information. \ No newline at end of file diff --git a/fern/products/api-def/pages/overrides.mdx b/fern/products/api-def/pages/overrides.mdx index 47d7cd0cba..c42e98ffb9 100644 --- a/fern/products/api-def/pages/overrides.mdx +++ b/fern/products/api-def/pages/overrides.mdx @@ -22,7 +22,7 @@ Overrides are available for OpenAPI, AsyncAPI, and OpenRPC specifications. -[Create an `overrides.yml` file](/cli-api-reference/cli-reference/commands#fern-write-overrides) in the folder that contains your API definition: +[Create an `overrides.yml` file](/learn/cli-api-reference/cli-reference/commands#fern-write-overrides) in the folder that contains your API definition: ```bash {6} fern/ diff --git a/fern/products/api-def/pages/project-structure.mdx b/fern/products/api-def/pages/project-structure.mdx index 69e9f78b9c..59bf19e4b2 100644 --- a/fern/products/api-def/pages/project-structure.mdx +++ b/fern/products/api-def/pages/project-structure.mdx @@ -7,7 +7,7 @@ description: Describes the Fern folder structure Configuring fern starts with the `fern` folder, which contains your API definitions, SDK generators, and your CLI version. -Fern recommends a multi-repository structure with your fern folder in a source repository (containing your API definitions and generation configuration) and [each generated SDK in its own separate repository](/sdks/overview/project-structure). +Fern recommends a multi-repository structure with your fern folder in a source repository (containing your API definitions and generation configuration) and [each generated SDK in its own separate repository](/learn/sdks/overview/project-structure). ## Directory structure @@ -41,7 +41,7 @@ The `fern.config.json` file stores your organization name and the Fern CLI versi ``` - When working with a locally installed CLI, set `version` to `"*"`. See [Install Fern CLI locally](/cli-api-reference/cli-reference/overview#install-fern-cli-locally) for details. + When working with a locally installed CLI, set `version` to `"*"`. See [Install Fern CLI locally](/learn/cli-api-reference/cli-reference/overview#install-fern-cli-locally) for details. ### `generators.yml` @@ -54,18 +54,18 @@ api: - openapi: ./openapi/openapi.yml ``` -For SDK generation, `generators.yml` is required. Add a `groups` section to configure which SDKs to generate. See the [SDKs project structure](/sdks/overview/project-structure#generatorsyml) for details. +For SDK generation, `generators.yml` is required. Add a `groups` section to configure which SDKs to generate. See the [SDKs project structure](/learn/sdks/overview/project-structure#generatorsyml) for details. ### API definition file -For [OpenAPI](/api-definitions/openapi/overview), [AsyncAPI](/api-definitions/asyncapi/overview), [OpenRPC](/api-definitions/openrpc/overview), and [gRPC](/api-definitions/grpc/overview), you'll have a single self-contained specification file. +For [OpenAPI](/learn/api-definitions/openapi/overview), [AsyncAPI](/learn/api-definitions/asyncapi/overview), [OpenRPC](/learn/api-definitions/openrpc/overview), and [gRPC](/learn/api-definitions/grpc/overview), you'll have a single self-contained specification file. ## Where to store your API definition There are four common ways to manage your API definition: - **Commit directly into your Fern repository (recommended).** Check your API definition file into the same repository that contains your Fern configuration. This is the simplest approach if you don't maintain the definition elsewhere. -- **Sync from a source code repository.** Store your API definition in the same repo as your API source code and sync updates into your Fern repository. You can automate this with the [`fern api update`](/cli-api-reference/cli-reference/commands#fern-api-update) CLI command or the [sync-openapi GitHub Action](/learn/api-definitions/openapi/sync-your-open-api-specification). +- **Sync from a source code repository.** Store your API definition in the same repo as your API source code and sync updates into your Fern repository. You can automate this with the [`fern api update`](/learn/cli-api-reference/cli-reference/commands#fern-api-update) CLI command or the [sync-openapi GitHub Action](/learn/api-definitions/openapi/sync-your-open-api-specification). - **Host at a public URL.** Serve the definition from a publicly accessible endpoint and configure the [`origin`](/learn/sdks/reference/generators-yml#openapi) field in `generators.yml` so Fern can fetch it. This is useful when you want a single canonical definition that multiple consumers can reference. - **Reference from a remote git repository.** Point [`openapi`](/learn/sdks/reference/generators-yml#openapi), [`asyncapi`](/learn/sdks/reference/generators-yml#asyncapi), or proto [`root`](/learn/sdks/reference/generators-yml#root) to a file in an external git repository using the `git` sub-object. The CLI shallow-clones the repository at generation time, using your local git credential configuration. This is useful when spec files live in a private repo you don't want to copy. diff --git a/fern/products/api-def/pages/what-is-an-api-definition.mdx b/fern/products/api-def/pages/what-is-an-api-definition.mdx index b150b025b1..184d49719a 100644 --- a/fern/products/api-def/pages/what-is-an-api-definition.mdx +++ b/fern/products/api-def/pages/what-is-an-api-definition.mdx @@ -273,28 +273,28 @@ you can regenerate these artifacts to ensure they are always up-to-date. Client libraries in multiple languages that automatically stay in sync with your API. Interactive API docs with code examples and live testing capabilities. } - href="/docs/integrations/postman" + href="/learn/docs/integrations/postman" > Ready-to-use collection with pre-filled example requests and responses. } - href="/api-definitions/openapi/frameworks/fastapi" + href="/learn/api-definitions/openapi/frameworks/fastapi" > Pydantic models for FastAPI or controllers for your Spring Boot application. diff --git a/fern/products/cli-api-reference/pages/commands.mdx b/fern/products/cli-api-reference/pages/commands.mdx index fca845fbb4..be13bd1b3d 100644 --- a/fern/products/cli-api-reference/pages/commands.mdx +++ b/fern/products/cli-api-reference/pages/commands.mdx @@ -155,10 +155,14 @@ hideOnThisPage: true Use `fern export` to generate an OpenAPI spec for your API. This is useful when you've defined your API in a format other than OpenAPI (such as the [Fern Definition](/learn/api-definitions/ferndef/overview)) and need to export it for integration with other tools or services. + The path argument is the **output file** to write. Use a `.yml` or `.json` extension to choose the format of the generated spec. ```bash + # Write the exported spec as YAML fern export [--api ] path/to/openapi.yml + + # ...or as JSON fern export [--api ] path/to/openapi.json ``` @@ -167,10 +171,19 @@ hideOnThisPage: true Use `--api` to specify which API to export when you have multiple APIs defined in your `fern/apis/` folder. - + ```bash fern export --api public-api path/to/openapi.yml - fern export --api public-api path/to/openapi.json + ``` + + + ### indent + + Use `--indent` to set the indentation size, in spaces, of the generated spec. + + + ```bash + fern export --indent 4 path/to/openapi.yml ``` @@ -1037,7 +1050,7 @@ hideOnThisPage: true Pulls the latest OpenAPI spec from the specified `origin` in `generators.yml` and - updates the local spec. Alternatively, you can [automate this process by setting up a GitHub Action](/api-definitions/openapi/sync-your-open-api-specification). + updates the local spec. Alternatively, you can [automate this process by setting up a GitHub Action](/learn/api-definitions/openapi/sync-your-open-api-specification). ```bash 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 8d646b99fc..1384e11034 100644 --- a/fern/products/docs/pages/api-references/customize-api-ref.mdx +++ b/fern/products/docs/pages/api-references/customize-api-ref.mdx @@ -123,7 +123,7 @@ navigation: ``` - You can alternatively customize tag display names directly in your spec (or overlays file) using the [`x-displayName` extension](/api-definitions/openapi/extensions/tag-display-names). + You can alternatively customize tag display names directly in your spec (or overlays file) using the [`x-displayName` extension](/learn/api-definitions/openapi/extensions/tag-display-names). ### Flattening sections diff --git a/fern/products/docs/pages/api-references/http-snippets.mdx b/fern/products/docs/pages/api-references/http-snippets.mdx index 517091f673..52188d4a9a 100644 --- a/fern/products/docs/pages/api-references/http-snippets.mdx +++ b/fern/products/docs/pages/api-references/http-snippets.mdx @@ -67,4 +67,4 @@ settings: ``` -This removes all HTTP snippet languages except cURL from the selector. cURL is always displayed and can't be removed via `docs.yml` configuration. To hide cURL, [use custom CSS](/docs/customization/custom-css-js#custom-css). +This removes all HTTP snippet languages except cURL from the selector. cURL is always displayed and can't be removed via `docs.yml` configuration. To hide cURL, [use custom CSS](/learn/docs/customization/custom-css-js#custom-css). diff --git a/fern/products/docs/pages/component-library/default-components/badges.mdx b/fern/products/docs/pages/component-library/default-components/badges.mdx index 2cf3a3ae45..7486b0b9c6 100644 --- a/fern/products/docs/pages/component-library/default-components/badges.mdx +++ b/fern/products/docs/pages/component-library/default-components/badges.mdx @@ -4,7 +4,7 @@ description: Display small labels for status, versions, and metadata inline with --- -Use the `` component to display small pieces of information, such as status indicators, categories, versions, or release dates. To display longer notes, use [callouts](/docs/writing-content/components/callouts). +Use the `` component to display small pieces of information, such as status indicators, categories, versions, or release dates. To display longer notes, use [callouts](/learn/docs/writing-content/components/callouts). ## Usage diff --git a/fern/products/docs/pages/component-library/default-components/callouts.mdx b/fern/products/docs/pages/component-library/default-components/callouts.mdx index b4a91f0103..490a6b1f4e 100644 --- a/fern/products/docs/pages/component-library/default-components/callouts.mdx +++ b/fern/products/docs/pages/component-library/default-components/callouts.mdx @@ -6,7 +6,7 @@ description: Learn how to use the Callout component to add warnings, tips, notes The `` component highlights important information, warnings, or tips in your documentation. Use callouts to emphasize critical details that readers shouldn't miss, such as breaking changes, prerequisites, or helpful best practices. -To display very short pieces of information like status indicators and version numbers, use [badges](/docs/writing-content/components/badges). +To display very short pieces of information like status indicators and version numbers, use [badges](/learn/docs/writing-content/components/badges). ## Usage diff --git a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx index 7c3c3cfa07..443643e807 100644 --- a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -548,7 +548,7 @@ Code blocks with the [same language](#supported-languages) automatically synchro - Code blocks automatically synchronize with [tabs in that same language](/docs/writing-content/components/tabs#language-synchronization). + Code blocks automatically synchronize with [tabs in that same language](/learn/docs/writing-content/components/tabs#language-synchronization). diff --git a/fern/products/docs/pages/component-library/default-components/files.mdx b/fern/products/docs/pages/component-library/default-components/files.mdx index 59992570b2..2b47bcd924 100644 --- a/fern/products/docs/pages/component-library/default-components/files.mdx +++ b/fern/products/docs/pages/component-library/default-components/files.mdx @@ -101,10 +101,10 @@ Add the `href` property to make files or folders clickable. This is useful for l
- - - - + + + + diff --git a/fern/products/docs/pages/component-library/default-components/overview.mdx b/fern/products/docs/pages/component-library/default-components/overview.mdx index 99e21bca62..9940f7068a 100644 --- a/fern/products/docs/pages/component-library/default-components/overview.mdx +++ b/fern/products/docs/pages/component-library/default-components/overview.mdx @@ -10,84 +10,84 @@ Fern includes 27 built-in components for creating interactive documentation. Sel Expandable sections for FAQs and collapsible content Linkable anchors for paragraphs, tables, and other content Sticky container for content positioned to the right of the page Small labels for status, versions, and metadata Interactive button component with multiple variants and intents Highlighted boxes for important information, warnings, and tips Visually distinct box with optional icons and links Code examples with syntax highlighting and interactive features Make text copyable with a click-to-copy button Download PDFs and other assets Endpoint request snippets from your API Reference Endpoint response snippets from your API Reference @@ -101,98 +101,98 @@ Fern includes 27 built-in components for creating interactive documentation. Sel Display interactive file tree structures with expandable folders Container for images with optional captions and backgrounds Font Awesome icons for visual elements Show or hide content based on instance, product, version, or user role Visual hierarchy with indentation and guide lines for nested content API parameter documentation with consistent formatting Copyable AI prompts that open in Cursor, Claude, or ChatGPT Interactive request builder for testing API endpoints Display any type definition from your API Reference Sequenced instructions with automatic numbering and anchor links Display data in rows and columns with optional sticky headers Tabbed interface for organizing related content Additional information displayed on hover Display different content based on version selection diff --git a/fern/products/docs/pages/component-library/default-components/tabs.mdx b/fern/products/docs/pages/component-library/default-components/tabs.mdx index a3036b5673..d09eb03830 100644 --- a/fern/products/docs/pages/component-library/default-components/tabs.mdx +++ b/fern/products/docs/pages/component-library/default-components/tabs.mdx @@ -107,7 +107,7 @@ Tabs with the [same language](/learn/docs/writing-content/components/code-blocks - Language-enabled tabs automatically synchronize with [code blocks in that same language](/docs/writing-content/components/code-blocks#language-synchronization). + Language-enabled tabs automatically synchronize with [code blocks in that same language](/learn/docs/writing-content/components/code-blocks#language-synchronization). diff --git a/fern/products/docs/pages/customization/announcement-banner.mdx b/fern/products/docs/pages/customization/announcement-banner.mdx index c0d1d15b62..f0a620bb0d 100644 --- a/fern/products/docs/pages/customization/announcement-banner.mdx +++ b/fern/products/docs/pages/customization/announcement-banner.mdx @@ -18,7 +18,7 @@ announcement: message: "🚀 New feature: Announcements are available! (Learn more) 🚀" ``` -The announcement message supports Markdown and HTML. You can include links, images, and other formatting, including [custom CSS](/docs/customization/custom-css-js#custom-css). +The announcement message supports Markdown and HTML. You can include links, images, and other formatting, including [custom CSS](/learn/docs/customization/custom-css-js#custom-css). ## Configuring announcements at multiple levels diff --git a/fern/products/docs/pages/customization/custom-css-js.mdx b/fern/products/docs/pages/customization/custom-css-js.mdx index 1b9f1ef665..12b69150f2 100644 --- a/fern/products/docs/pages/customization/custom-css-js.mdx +++ b/fern/products/docs/pages/customization/custom-css-js.mdx @@ -12,7 +12,7 @@ This page covers CSS and JavaScript customization: For server-rendered reusable elements in your MDX content, see [Custom React components](/learn/docs/customization/custom-react-components). To replace Fern's default header or footer, see [Custom header and footer](/learn/docs/customization/header-and-footer). -You can also [customize many things directly in your `docs.yml` file](/docs/configuration/site-level-settings), including colors, typography, navbar links, layout, analytics, and metadata. Try these built-in options first before adding custom code. +You can also [customize many things directly in your `docs.yml` file](/learn/docs/configuration/site-level-settings), including colors, typography, navbar links, layout, analytics, and metadata. Try these built-in options first before adding custom code. ## Custom CSS @@ -426,7 +426,7 @@ js: ### Common use cases - **Third-party integrations:** For tools not natively supported in `docs.yml`, add analytics, session recording, support widgets, or tag managers by pasting their embed snippets into your custom JS file. See [Integrating third-party tools](/learn/docs/integrations/overview#connect-other-integrations-via-custom-javascript) for supported tools and examples. -- **Custom search:** Implement custom search (also requires [your Algolia credentials](/docs/customization/search)) +- **Custom search:** Implement custom search (also requires [your Algolia credentials](/learn/docs/customization/search)) - **Scripts and widgets:** Insert any client-side scripts or embeddable widgets \ No newline at end of file diff --git a/fern/products/docs/pages/customization/custom-header-footer.mdx b/fern/products/docs/pages/customization/custom-header-footer.mdx index eb79723db2..0ddd648725 100644 --- a/fern/products/docs/pages/customization/custom-header-footer.mdx +++ b/fern/products/docs/pages/customization/custom-header-footer.mdx @@ -94,14 +94,14 @@ The following components are available on the `Fern` prop: | Component | Description | | --- | --- | -| `` | Your site [logo](/docs/configuration/site-level-settings#logo-configuration) as configured in `docs.yml`. Links to the homepage. You can target this component with `document.querySelector('#fern-header [data-fern-logo]')`. | -| `` | The [search](/docs/customization/search) bar, including the AI search trigger if enabled. | -| `` | Dropdown to switch between [products](/docs/configuration/products). | -| `` | Dropdown to switch between [versions](/docs/configuration/versions). | -| `` | Dropdown to switch the active [SDK language](/docs/configuration/site-level-settings#default-language). | -| `` | The [navigation links](/docs/configuration/site-level-settings#navbar-links-configuration) configured under `navbar-links` in `docs.yml`. | -| `` | The login/signup button for [authenticated docs](/docs/authentication/overview). | -| `` | Toggle between [light and dark mode](/docs/configuration/site-level-settings#theme-configuration). | +| `` | Your site [logo](/learn/docs/configuration/site-level-settings#logo-configuration) as configured in `docs.yml`. Links to the homepage. You can target this component with `document.querySelector('#fern-header [data-fern-logo]')`. | +| `` | The [search](/learn/docs/customization/search) bar, including the AI search trigger if enabled. | +| `` | Dropdown to switch between [products](/learn/docs/configuration/products). | +| `` | Dropdown to switch between [versions](/learn/docs/configuration/versions). | +| `` | Dropdown to switch the active [SDK language](/learn/docs/configuration/site-level-settings#default-language). | +| `` | The [navigation links](/learn/docs/configuration/site-level-settings#navbar-links-configuration) configured under `navbar-links` in `docs.yml`. | +| `` | The login/signup button for [authenticated docs](/learn/docs/authentication/overview). | +| `` | Toggle between [light and dark mode](/learn/docs/configuration/site-level-settings#theme-configuration). | | `` | Fern's built-in mobile sidebar toggle button. Shows a hamburger/close icon and opens the dismissible sidebar. Only visible on mobile viewports. | diff --git a/fern/products/docs/pages/getting-started/project-structure.mdx b/fern/products/docs/pages/getting-started/project-structure.mdx index 315611be89..0f99c28af0 100644 --- a/fern/products/docs/pages/getting-started/project-structure.mdx +++ b/fern/products/docs/pages/getting-started/project-structure.mdx @@ -65,7 +65,7 @@ The `docs.yml` file is the heart of your Fern documentation site. This configura Fern treats `.yml` and `.yaml` extensions identically. This applies to all YAML files in a Fern project, including `docs.yml`, `generators.yml`, and API specification files. -For complete configuration options, see the [`docs.yml` reference](/docs/configuration/site-level-settings). +For complete configuration options, see the [`docs.yml` reference](/learn/docs/configuration/site-level-settings). ```yml @@ -123,9 +123,9 @@ css: styles.css ## API definitions and `generators.yml` -To generate [API Reference](/docs/api-references/generate-api-ref) documentation, you need to provide your API definition. OpenAPI and AsyncAPI specs require a `generators.yml` file with an `api.specs` section. You can optionally add a `groups` section for SDK generation. +To generate [API Reference](/learn/docs/api-references/generate-api-ref) documentation, you need to provide your API definition. OpenAPI and AsyncAPI specs require a `generators.yml` file with an `api.specs` section. You can optionally add a `groups` section for SDK generation. -Using Fern for both API Reference docs and SDKs? You'll use `docs.yml` for your documentation settings and `generators.yml` to configure [SDK code snippets](/docs/api-references/sdk-snippets) in your API Reference. +Using Fern for both API Reference docs and SDKs? You'll use `docs.yml` for your documentation settings and `generators.yml` to configure [SDK code snippets](/learn/docs/api-references/sdk-snippets) in your API Reference. @@ -191,7 +191,7 @@ The `fern.config.json` file stores your organization name and the Fern CLI versi ``` - When working with a locally installed CLI, set `version` to `"*"`. See [Install Fern CLI locally](/cli-api-reference/cli-reference/overview#install-fern-cli-locally) for details. + When working with a locally installed CLI, set `version` to `"*"`. See [Install Fern CLI locally](/learn/cli-api-reference/cli-reference/overview#install-fern-cli-locally) for details. diff --git a/fern/products/docs/pages/getting-started/quickstart.mdx b/fern/products/docs/pages/getting-started/quickstart.mdx index 26f1366ad3..ac371c1c15 100644 --- a/fern/products/docs/pages/getting-started/quickstart.mdx +++ b/fern/products/docs/pages/getting-started/quickstart.mdx @@ -291,7 +291,7 @@ Build and publish a docs site with Fern. Follow the [Docs quickstart](https://bu - Before publishing, [preview your changes](/docs/preview-publish/preview-changes) in your local development environment or generate shareable preview links. + Before publishing, [preview your changes](/learn/docs/preview-publish/preview-changes) in your local development environment or generate shareable preview links. @@ -337,7 +337,7 @@ Build and publish a docs site with Fern. Follow the [Docs quickstart](https://bu fern generate --docs --no-prompt ``` - **Authentication**: The CLI checks for a `FERN_TOKEN` environment variable first, then falls back to a cached credential from `fern login`. Running `fern login` once caches the credential locally, so subsequent `fern generate --docs` runs won't prompt for login again. There is no `fern whoami` command. In GitHub Actions, store the API key as a repository secret named `FERN_TOKEN`. See [publishing your docs](/learn/docs/getting-started/publishing-your-docs.md) for full CI workflow examples. + **Authentication**: The CLI checks for a `FERN_TOKEN` environment variable first, then falls back to a cached credential from `fern login`. Running `fern login` once caches the credential locally, so subsequent `fern generate --docs` runs won't prompt for login again. There is no `fern whoami` command. In GitHub Actions, store the API key as a repository secret named `FERN_TOKEN`. See [publishing your docs](/learn/docs/preview-publish/publishing-your-docs) for full CI workflow examples. @@ -407,7 +407,7 @@ Fern Docs compiles MDX content and YAML configuration into a hosted static site ### Configuration file roles - **`fern.config.json`**: Identifies your organization and pins the CLI version. Required in every Fern project. -- **`docs.yml`**: Central manifest for the entire site — navigation structure, tabs, branding (colors, logo, favicon, typography), hosting instances, custom domains, navbar links, footer, integrations, redirects, RBAC roles, and AI agent settings. [Full reference](/learn/docs/configuration/site-level-settings.md). +- **`docs.yml`**: Central manifest for the entire site — navigation structure, tabs, branding (colors, logo, favicon, typography), hosting instances, custom domains, navbar links, footer, integrations, redirects, RBAC roles, and AI agent settings. [Full reference](/learn/docs/configuration/site-level-settings). - **`generators.yml`**: Points the CLI to your API spec files via the `api.specs` section. Also configures SDK generation. ### Common pitfalls @@ -425,5 +425,5 @@ instances: - url: your-org.docs.buildwithfern.com ``` -This is enough to publish (the CLI will build an empty site). In practice, most teams add `navigation` to define the sidebar, plus basic branding — these are shown in the [Customize your docs](#customize-your-docs) step above. The full list of available fields is in the [site-level settings reference](/learn/docs/configuration/site-level-settings.md). +This is enough to publish (the CLI will build an empty site). In practice, most teams add `navigation` to define the sidebar, plus basic branding — these are shown in the [Customize your docs](#customize-your-docs) step above. The full list of available fields is in the [site-level settings reference](/learn/docs/configuration/site-level-settings). diff --git a/fern/products/docs/pages/integrations/overview.mdx b/fern/products/docs/pages/integrations/overview.mdx index 7cd3d03a16..1a6f74fdd6 100644 --- a/fern/products/docs/pages/integrations/overview.mdx +++ b/fern/products/docs/pages/integrations/overview.mdx @@ -13,7 +13,7 @@ Fern's [built-in web analytics](/learn/dashboard/metrics/web-analytics) reports } iconSize={12} @@ -21,7 +21,7 @@ Fern's [built-in web analytics](/learn/dashboard/metrics/web-analytics) reports } iconSize={12} @@ -29,7 +29,7 @@ Fern's [built-in web analytics](/learn/dashboard/metrics/web-analytics) reports @@ -39,7 +39,7 @@ Fern's [built-in web analytics](/learn/dashboard/metrics/web-analytics) reports } iconSize={12} @@ -53,7 +53,7 @@ Fern's [built-in web analytics](/learn/dashboard/metrics/web-analytics) reports } iconSize={12} @@ -61,7 +61,7 @@ Fern's [built-in web analytics](/learn/dashboard/metrics/web-analytics) reports } iconSize={12} @@ -75,7 +75,7 @@ Fern's [built-in web analytics](/learn/dashboard/metrics/web-analytics) reports } iconSize={12} @@ -83,7 +83,7 @@ Fern's [built-in web analytics](/learn/dashboard/metrics/web-analytics) reports } iconSize={12} @@ -133,7 +133,7 @@ If you use GitHub Workflows to trigger docs generation, the environment variable -You can integrate third-party tools that Fern doesn't natively support in `docs.yml` using [custom JavaScript](/docs/customization/custom-css-js#custom-javascript), as long as they support HTML tag-based installation. This works with tools like: +You can integrate third-party tools that Fern doesn't natively support in `docs.yml` using [custom JavaScript](/learn/docs/customization/custom-css-js#custom-javascript), as long as they support HTML tag-based installation. This works with tools like: - **Analytics:** Amplitude, Heap, Plausible - **Session recording:** Hotjar, LogRocket, Microsoft Clarity diff --git a/fern/products/docs/pages/navigation/frontmatter.mdx b/fern/products/docs/pages/navigation/frontmatter.mdx index 08393ddee7..d46d355fa5 100644 --- a/fern/products/docs/pages/navigation/frontmatter.mdx +++ b/fern/products/docs/pages/navigation/frontmatter.mdx @@ -8,7 +8,7 @@ description: Use frontmatter to set a variety of page properties and metadata. You can optionally use frontmatter to set each page's title, slug override, meta description, a URL to suggest edits to the page, and its OpenGraph image. You can also use frontmatter to disable certain page elements like the table of contents, on-page feedback, and page actions. - For advanced styling and functionality customizations beyond frontmatter options, see [custom CSS and JavaScript](/docs/customization/custom-css-js). + For advanced styling and functionality customizations beyond frontmatter options, see [custom CSS and JavaScript](/learn/docs/customization/custom-css-js). ## Frontmatter syntax @@ -378,7 +378,7 @@ This is useful when you want to set availability for individual pages without mo ## Changelog tags - For [changelog pages](/docs/configuration/changelogs) only. Tags allow users to filter changelog entries by specific categories. Define tags as an array of strings in the frontmatter. + For [changelog pages](/learn/docs/configuration/changelogs) only. Tags allow users to filter changelog entries by specific categories. Define tags as an array of strings in the frontmatter. diff --git a/fern/products/docs/pages/navigation/products.mdx b/fern/products/docs/pages/navigation/products.mdx index 958795c3dd..a0efbb61a0 100644 --- a/fern/products/docs/pages/navigation/products.mdx +++ b/fern/products/docs/pages/navigation/products.mdx @@ -274,7 +274,7 @@ If your product-specific `.yml` files for **versioned products** includes a `nav ### Add instance audiences -Control which versions and/or products appear in each [documentation instance](/docs/configuration/site-level-settings#instances-configuration) by tagging them with audiences. This enables separate sites for different user groups (e.g., internal developers, beta testers, public customers). +Control which versions and/or products appear in each [documentation instance](/learn/docs/configuration/site-level-settings#instances-configuration) by tagging them with audiences. This enables separate sites for different user groups (e.g., internal developers, beta testers, public customers). Content is filtered based on audience tags: @@ -317,7 +317,7 @@ products: -Instance audiences work alongside [API Reference audiences](/docs/api-references/audiences), which filter endpoints and schemas within your API documentation. You can use both features together: +Instance audiences work alongside [API Reference audiences](/learn/docs/api-references/audiences), which filter endpoints and schemas within your API documentation. You can use both features together: - **Instance audiences** - Control which products and versions appear in each instance - **API Reference audiences** - Control which endpoints and schemas appear within API References diff --git a/fern/products/docs/pages/navigation/site-level-settings.mdx b/fern/products/docs/pages/navigation/site-level-settings.mdx index c3699b8ef7..f6b7604622 100644 --- a/fern/products/docs/pages/navigation/site-level-settings.mdx +++ b/fern/products/docs/pages/navigation/site-level-settings.mdx @@ -6,7 +6,7 @@ max-toc-depth: 2 --- -The `docs.yml` file is your primary tool for customizing colors, typography, layout, analytics, and more across your documentation site. Start here for most customization needs before considering [custom CSS and JavaScript](/docs/customization/custom-css-js) for advanced use cases. +The `docs.yml` file is your primary tool for customizing colors, typography, layout, analytics, and more across your documentation site. Start here for most customization needs before considering [custom CSS and JavaScript](/learn/docs/customization/custom-css-js) for advanced use cases. ### YAML Schema Validation @@ -155,7 +155,7 @@ instances: Specify which audiences this instance serves (e.g., internal developers, beta testers, public customers). - You can use audiences to control which versions and products appear in each documentation instance, enabling you to create separate sites for different user groups. Content is included when its audience tag matches the instance audience. Content without an audience tag is included by default. Learn more about configuring instance audiences for [products and/or versions](/docs/configuration/products#add-instance-audiences). + You can use audiences to control which versions and products appear in each documentation instance, enabling you to create separate sites for different user groups. Content is included when its audience tag matches the instance audience. Content without an audience tag is included by default. Learn more about configuring instance audiences for [products and/or versions](/learn/docs/configuration/products#add-instance-audiences). @@ -779,7 +779,7 @@ settings: - Controls the display of [HTTP snippets in the API Reference](/docs/api-references/http-snippets). HTTP snippets are enabled by default for all languages. + Controls the display of [HTTP snippets in the API Reference](/learn/docs/api-references/http-snippets). HTTP snippets are enabled by default for all languages. - Set to `false` to disable HTTP snippets completely - Provide a list of languages to enable snippets for specific languages only @@ -1048,7 +1048,7 @@ landing-page: Configure site-wide Open Graph and Twitter Card metadata to control how your documentation appears in social media previews and search results. - [Use the `keywords` property in a page's frontmatter](/docs/configuration/page-level-settings#seo-metadata). + [Use the `keywords` property in a page's frontmatter](/learn/docs/configuration/page-level-settings#seo-metadata). @@ -1337,7 +1337,7 @@ experimental: ``` - Controls dynamic SDK snippets that allow users to modify parameters and see code examples update in real time. Dynamic snippets are enabled by default and supported across all languages. Follow the [SDK snippets setup instructions](/docs/api-references/sdk-snippets) to configure. Set to false to use static SDK snippets instead. + Controls dynamic SDK snippets that allow users to modify parameters and see code examples update in real time. Dynamic snippets are enabled by default and supported across all languages. Follow the [SDK snippets setup instructions](/learn/docs/api-references/sdk-snippets) to configure. Set to false to use static SDK snippets instead. diff --git a/fern/products/docs/pages/navigation/versions.mdx b/fern/products/docs/pages/navigation/versions.mdx index 307f452398..84c5e1e651 100644 --- a/fern/products/docs/pages/navigation/versions.mdx +++ b/fern/products/docs/pages/navigation/versions.mdx @@ -45,7 +45,7 @@ Version-specific `yml` files: -You can also have [multiple products, some versioned and some unversioned](/docs/configuration/products). +You can also have [multiple products, some versioned and some unversioned](/learn/docs/configuration/products). @@ -146,7 +146,7 @@ In this example, setting `slug: v3` produces URLs like `/docs/v3/getting-started -Control which versions appear in each [documentation instance](/docs/configuration/site-level-settings#instances-configuration) by tagging them with audiences. This enables separate sites for different user groups (e.g., internal developers, beta testers, public customers). +Control which versions appear in each [documentation instance](/learn/docs/configuration/site-level-settings#instances-configuration) by tagging them with audiences. This enables separate sites for different user groups (e.g., internal developers, beta testers, public customers). Content is filtered based on audience tags: diff --git a/fern/products/docs/pages/preview-publish/publishing-your-docs.mdx b/fern/products/docs/pages/preview-publish/publishing-your-docs.mdx index 1d4fcc7add..9c0badd4fc 100644 --- a/fern/products/docs/pages/preview-publish/publishing-your-docs.mdx +++ b/fern/products/docs/pages/preview-publish/publishing-your-docs.mdx @@ -182,11 +182,11 @@ To deploy to production, go to the **Actions** tab in your GitHub repository, se ## Hosting -When you publish your docs, Fern takes care of hosting them for you. You can also [publish your docs to a custom domain](/docs/preview-publish/setting-up-your-domain). +When you publish your docs, Fern takes care of hosting them for you. You can also [publish your docs to a custom domain](/learn/docs/preview-publish/setting-up-your-domain). ### Self-hosting your docs -If you need access to your docs offline or would like to host your docs on your own server, Fern [offers that option as well](/docs/self-hosted/overview). Self-hosted docs have limited access to certain features (including Ask Fern and analytics). +If you need access to your docs offline or would like to host your docs on your own server, Fern [offers that option as well](/learn/docs/self-hosted/overview). Self-hosted docs have limited access to certain features (including Ask Fern and analytics). ## Unpublishing your docs diff --git a/fern/products/docs/pages/seo/redirects.mdx b/fern/products/docs/pages/seo/redirects.mdx index 328b895c69..37789cf1c4 100644 --- a/fern/products/docs/pages/seo/redirects.mdx +++ b/fern/products/docs/pages/seo/redirects.mdx @@ -73,7 +73,7 @@ redirects: destination: / # Don't do this ``` -Instead, [enable automatic homepage redirects in your `docs.yml`](/docs/configuration/site-level-settings#settings-configuration) to send broken links to your homepage rather than showing a 404 page: +Instead, [enable automatic homepage redirects in your `docs.yml`](/learn/docs/configuration/site-level-settings#settings-configuration) to send broken links to your homepage rather than showing a 404 page: ```yaml title="docs.yml" settings: @@ -83,7 +83,7 @@ settings: -If you have [versions](/docs/configuration/versions) configured, your default version uses unversioned paths (`/docs/getting-started`), while other versions use versioned paths (`/docs/v2/getting-started`). Fern automatically handles version routing by redirecting broken versioned links to the default version and managing canonical URLs. +If you have [versions](/learn/docs/configuration/versions) configured, your default version uses unversioned paths (`/docs/getting-started`), while other versions use versioned paths (`/docs/v2/getting-started`). Fern automatically handles version routing by redirecting broken versioned links to the default version and managing canonical URLs. Avoid redirecting from unversioned to versioned URLs: diff --git a/fern/products/docs/snippets/default-version.mdx b/fern/products/docs/snippets/default-version.mdx index 2b29dc79e7..1da0f2953b 100644 --- a/fern/products/docs/snippets/default-version.mdx +++ b/fern/products/docs/snippets/default-version.mdx @@ -2,5 +2,5 @@ Versions appear in a dropdown on your site in the order listed in `docs.yml`. The first version in your `versions` list is the default version and uses unversioned paths like `example.com/getting-started`. Other versions use versioned paths like `example.com/v2/getting-started`. - Fern automatically handles version routing by [redirecting](/docs/seo/redirects) broken versioned links to the default version. Canonical URLs point to the unversioned path to consolidate SEO signals. To override this for version-specific pages, see [SEO metadata](/learn/docs/seo/setting-seo-metadata#canonical-url). + Fern automatically handles version routing by [redirecting](/learn/docs/seo/redirects) broken versioned links to the default version. Canonical URLs point to the unversioned path to consolidate SEO signals. To override this for version-specific pages, see [SEO metadata](/learn/docs/seo/setting-seo-metadata#canonical-url). diff --git a/fern/products/home/pages/welcome.mdx b/fern/products/home/pages/welcome.mdx index d2df33fa04..c7d982f404 100644 --- a/fern/products/home/pages/welcome.mdx +++ b/fern/products/home/pages/welcome.mdx @@ -31,7 +31,7 @@ layout: custom {/* SDKs Card */}
- + SDKs Arrow right light Arrow right light @@ -52,37 +52,37 @@ layout: custom
Get started with: {/* TypeScript */} - + TypeScript {/* Python */} - + Python {/* Go */} - + Go {/* Java */} - + Java {/* C# */} - + C# {/* PHP */} - + PHP {/* Ruby */} Ruby - + Swift - + Rust Rust @@ -90,12 +90,12 @@ layout: custom {/* Action Buttons */}
- + Introduction Arrow right light Arrow right light - + Quickstart Arrow right light Arrow right light @@ -111,7 +111,7 @@ layout: custom {/* Docs Card */}
{/* Rive Animation */} - +
- + OpenAPI OpenAPI

OpenAPI

- + AsyncAPI AsyncAPI

AsyncAPI

- + OpenRPC OpenRPC

OpenRPC

- + gRPC gRPC @@ -267,42 +267,42 @@ layout: custom See our most recent product updates.

- + Docs - + TypeScript {/* Python */} - + Python {/* Go */} - + Go {/* Java */} - + Java {/* C# */} - + C# {/* PHP */} - + PHP {/* Ruby */} - + Ruby {/* Swift */} - + Swift {/* Rust */} - + Rust Rust @@ -384,23 +384,23 @@ layout: custom Generate client libraries in multiple languages. -Get started with: [TypeScript](/sdks/generators/typescript/quickstart), [Python](/sdks/generators/python/quickstart), [Go](/sdks/generators/go/quickstart), [Java](/sdks/generators/java/quickstart), [C#](/sdks/generators/csharp/quickstart), [PHP](/sdks/generators/php/quickstart), [Ruby](/learn/sdks/generators/ruby/quickstart), [Swift](/sdks/generators/swift/quickstart), [Rust](/sdks/generators/rust/quickstart) +Get started with: [TypeScript](/learn/sdks/generators/typescript/quickstart), [Python](/learn/sdks/generators/python/quickstart), [Go](/learn/sdks/generators/go/quickstart), [Java](/learn/sdks/generators/java/quickstart), [C#](/learn/sdks/generators/csharp/quickstart), [PHP](/learn/sdks/generators/php/quickstart), [Ruby](/learn/sdks/generators/ruby/quickstart), [Swift](/learn/sdks/generators/swift/quickstart), [Rust](/learn/sdks/generators/rust/quickstart) -- [Introduction](/sdks/overview/introduction) -- [Quickstart](/sdks/overview/quickstart) +- [Introduction](/learn/sdks/overview/introduction) +- [Quickstart](/learn/sdks/overview/quickstart) - [Customers](https://buildwithfern.com/showcase) ## Docs A beautiful, interactive documentation website. -- [Introduction](/docs/getting-started/capabilities) -- [Quickstart](/docs/getting-started/quickstart) -- [AI features](/docs/ai-features/overview) -- [Fern Editor](/docs/writing-content/fern-editor) -- [Bring your own API spec](/docs/api-references/generate-api-ref) -- [Gate docs by role](/docs/authentication/features/rbac) -- [Self-host your docs](/docs/self-hosted/overview) +- [Introduction](/learn/docs/getting-started/capabilities) +- [Quickstart](/learn/docs/getting-started/quickstart) +- [AI features](/learn/docs/ai-features/overview) +- [Fern Editor](/learn/docs/writing-content/fern-editor) +- [Bring your own API spec](/learn/docs/api-references/generate-api-ref) +- [Gate docs by role](/learn/docs/authentication/features/rbac) +- [Self-host your docs](/learn/docs/self-hosted/overview) - [Customers](https://buildwithfern.com/showcase#docs-customers.alldocs-features) ## Ask Fern @@ -415,14 +415,14 @@ AI search to find answers in your documentation instantly. Select one or more specs to generate SDKs and Docs. -- [OpenAPI](/api-definitions/openapi/overview) -- [AsyncAPI](/api-definitions/asyncapi/overview) -- [OpenRPC](/api-definitions/openrpc/overview) -- [gRPC](/api-definitions/grpc/overview) +- [OpenAPI](/learn/api-definitions/openapi/overview) +- [AsyncAPI](/learn/api-definitions/asyncapi/overview) +- [OpenRPC](/learn/api-definitions/openrpc/overview) +- [gRPC](/learn/api-definitions/grpc/overview) ## Community -- [Changelog](/docs/changelog): See the most recent product updates. +- [Changelog](/learn/docs/changelog): See the most recent product updates. - [GitHub](https://github.com/fern-api/fern): Follow progress and contribute to the codebase. - [X](https://x.com/buildwithfern): Get updates on the Fern platform. diff --git a/fern/products/sdks/capabilities.mdx b/fern/products/sdks/capabilities.mdx index ffb52c3973..537dc756f8 100644 --- a/fern/products/sdks/capabilities.mdx +++ b/fern/products/sdks/capabilities.mdx @@ -26,7 +26,7 @@ layout: overview - + Fine-tune SDK resources and method names

@@ -39,7 +39,7 @@ layout: overview - + Fail fast if payloads diverge from your schema

@@ -51,7 +51,7 @@ layout: overview

- + Fern SDKs include support for discriminated unions

@@ -95,7 +95,7 @@ layout: overview - + Paginate through API responses easily with offset, cursor, and link-based pagination.

@@ -108,7 +108,7 @@ layout: overview - + Fern supports OAuth as a first class citizen

@@ -121,7 +121,7 @@ layout: overview - + Automatically retry failed requests with exponential backoff

@@ -147,7 +147,7 @@ layout: overview - + Built-in protection against duplicate submissions

@@ -173,7 +173,7 @@ layout: overview - + Auto-generated and handwritten tests to ensure your SDK works in production

@@ -186,7 +186,7 @@ layout: overview - + No longer depend on manually written code snippets

@@ -199,7 +199,7 @@ layout: overview - + Extend the generated SDK to provide additional functionality

@@ -212,7 +212,7 @@ layout: overview - + Multiple API definitions. One SDK.

@@ -225,7 +225,7 @@ layout: overview - + Generate typed WebSocket clients with connection management and reconnection

@@ -246,22 +246,22 @@ Fern SDKs include the following capabilities: - **Strongly typed**: Move fast and break nothing with type safety. - **IDE support**: Rich autocomplete and inline documentation in your editor. [Learn more](/learn/sdks/deep-dives/sdk-user-features#ide-support-and-intellisense) -- **Idiomatic method names**: Fine-tune SDK resources and method names. [Learn more](/sdks/deep-dives/customize-method-names) -- **Schema validation**: Fail fast if payloads diverge from your schema. [Learn more](/sdks/deep-dives/testing#mock-server-tests) -- **Discriminated unions**: Support for discriminated unions. [Learn more](/api-definitions/ferndef/types#discriminated-unions) +- **Idiomatic method names**: Fine-tune SDK resources and method names. [Learn more](/learn/sdks/deep-dives/customize-method-names) +- **Schema validation**: Fail fast if payloads diverge from your schema. [Learn more](/learn/sdks/deep-dives/testing#mock-server-tests) +- **Discriminated unions**: Support for discriminated unions. [Learn more](/learn/api-definitions/ferndef/types#discriminated-unions) - **Multipart form data**: SDKs that handle multipart form data. - **Forward compatibility**: SDKs that are fault-tolerant as your API evolves. - **Automated releases**: Automatically detects API changes, regenerates SDKs, and publishes to registries. [Learn more](/learn/sdks/overview/autorelease) -- **Auto-pagination**: Paginate through API responses using offset, cursor, and link-based pagination. [Learn more](/sdks/deep-dives/auto-pagination) -- **OAuth token refresh**: First-class OAuth support. [Learn more](/sdks/reference/generators-yml#oauth) -- **Retries with backoff**: Automatically retry failed requests with exponential backoff. [Learn more](/sdks/deep-dives/retries-with-backoff) +- **Auto-pagination**: Paginate through API responses using offset, cursor, and link-based pagination. [Learn more](/learn/sdks/deep-dives/auto-pagination) +- **OAuth token refresh**: First-class OAuth support. [Learn more](/learn/sdks/reference/generators-yml#oauth) +- **Retries with backoff**: Automatically retry failed requests with exponential backoff. [Learn more](/learn/sdks/deep-dives/retries-with-backoff) - **Webhook signature verification**: Verify the signature of incoming webhook requests. [Learn more](/learn/sdks/deep-dives/webhook-signature-verification) -- **Idempotency headers**: Built-in protection against duplicate submissions. [Learn more](/sdks/deep-dives/idempotency) +- **Idempotency headers**: Built-in protection against duplicate submissions. [Learn more](/learn/sdks/deep-dives/idempotency) - **Server-sent events**: Stream JSON data from your server to your client, with opt-in access to [SSE metadata](/learn/sdks/deep-dives/sse-metadata) (event ID, event type, retry) and [automatic reconnection](/learn/sdks/deep-dives/sse-metadata#automatic-reconnection) for resumable endpoints. [Learn more](/learn/sdks/deep-dives/sse-metadata) -- **Testing**: Auto-generated and handwritten tests for your SDK. [Learn more](/sdks/deep-dives/testing) -- **Code snippets**: No longer depend on manually written code snippets. [Learn more](/docs/api-references/sdk-snippets) -- **Augment with custom code**: Extend the generated SDK with additional functionality. [Learn more](/sdks/overview/custom-code) -- **Merging multiple APIs**: Multiple API definitions, one SDK. [Learn more](/api-definitions/overview/project-structure#multiple-apis) -- **WebSockets**: Generate typed WebSocket clients with connection management and reconnection. [Learn more](/sdks/deep-dives/websocket-clients) +- **Testing**: Auto-generated and handwritten tests for your SDK. [Learn more](/learn/sdks/deep-dives/testing) +- **Code snippets**: No longer depend on manually written code snippets. [Learn more](/learn/docs/api-references/sdk-snippets) +- **Augment with custom code**: Extend the generated SDK with additional functionality. [Learn more](/learn/sdks/overview/custom-code) +- **Merging multiple APIs**: Multiple API definitions, one SDK. [Learn more](/learn/api-definitions/overview/project-structure#multiple-apis) +- **WebSockets**: Generate typed WebSocket clients with connection management and reconnection. [Learn more](/learn/sdks/deep-dives/websocket-clients) diff --git a/fern/products/sdks/custom-code.mdx b/fern/products/sdks/custom-code.mdx index 5e076c1581..f27e618ab3 100644 --- a/fern/products/sdks/custom-code.mdx +++ b/fern/products/sdks/custom-code.mdx @@ -94,11 +94,11 @@ To disable Replay, set `replay.enabled: false` at the top level of `generators.y Each SDK generator has its own conventions for adding custom code: how to extend the generated client, where helpers go, how to declare dependencies. See the guide for your language: - } href="/sdks/generators/typescript/custom-code" /> - } href="/sdks/generators/python/custom-code" /> + } href="/learn/sdks/generators/typescript/custom-code" /> + } href="/learn/sdks/generators/python/custom-code" /> } href="/learn/sdks/generators/go/custom-code" /> } href="/learn/sdks/generators/java/custom-code" /> - } href="/sdks/generators/csharp/custom-code" /> - } href="/sdks/generators/php/custom-code" /> - } href="/sdks/generators/ruby/custom-code" /> + } href="/learn/sdks/generators/csharp/custom-code" /> + } href="/learn/sdks/generators/php/custom-code" /> + } href="/learn/sdks/generators/ruby/custom-code" /> diff --git a/fern/products/sdks/deep-dives/dynamic-authentication.mdx b/fern/products/sdks/deep-dives/dynamic-authentication.mdx index b4a4c45c43..8bdc264e61 100644 --- a/fern/products/sdks/deep-dives/dynamic-authentication.mdx +++ b/fern/products/sdks/deep-dives/dynamic-authentication.mdx @@ -11,10 +11,10 @@ Your API may require dynamic authentication where credentials need to be generat Each language has its own recommended approach for implementing dynamic authentication: - + Use custom fetcher middleware to inject authentication logic in a single place for all requests. Supports JWT signing, OAuth token refresh, and more. - + Use method overrides to inject authentication logic for each API call. Supports JWT signing, OAuth token refresh, and more. @@ -52,6 +52,6 @@ When implementing dynamic authentication, keep these language-agnostic considera ## See also -- [Adding custom code](/sdks/overview/custom-code) - Learn more about extending generated SDKs -- [TypeScript custom code](/sdks/generators/typescript/custom-code) - TypeScript-specific customization guide -- [Python custom code](/sdks/generators/python/custom-code) - Python-specific customization guide +- [Adding custom code](/learn/sdks/overview/custom-code) - Learn more about extending generated SDKs +- [TypeScript custom code](/learn/sdks/generators/typescript/custom-code) - TypeScript-specific customization guide +- [Python custom code](/learn/sdks/generators/python/custom-code) - Python-specific customization guide diff --git a/fern/products/sdks/deep-dives/generated-sdk.mdx b/fern/products/sdks/deep-dives/generated-sdk.mdx index f440e3a059..ca163f78e9 100644 --- a/fern/products/sdks/deep-dives/generated-sdk.mdx +++ b/fern/products/sdks/deep-dives/generated-sdk.mdx @@ -76,7 +76,7 @@ Your SDK users can configure individual requests using language-specific options | Option | Description | Availability | |--------|-------------|--------------| | Timeouts | Configure request timeouts (default: 30 seconds for [C#](/learn/sdks/generators/csharp/configuration#default-timeout-in-milliseconds) and PHP, 60 seconds for all other languages) | All languages | -| [Retries](/sdks/deep-dives/retries-with-backoff) | Configure maximum retries (default: 2 with exponential backoff for 408, 429, and 5xx responses) | All languages except Ruby and Swift | +| [Retries](/learn/sdks/deep-dives/retries-with-backoff) | Configure maximum retries (default: 2 with exponential backoff for 408, 429, and 5xx responses) | All languages except Ruby and Swift | | Custom HTTP client | Override the default HTTP client for unsupported environments or custom requirements | TypeScript, Python, Java, PHP, and Swift | | [aiohttp transport](/learn/sdks/generators/python/aiohttp-support) | Opt into `aiohttp` as the async HTTP transport to resolve DNS concurrency bottlenecks | Python only | | Custom headers | Send additional headers with any request | TypeScript, Java, and Swift | diff --git a/fern/products/sdks/deep-dives/self-hosted.mdx b/fern/products/sdks/deep-dives/self-hosted.mdx index 609423a85c..08c931ef20 100644 --- a/fern/products/sdks/deep-dives/self-hosted.mdx +++ b/fern/products/sdks/deep-dives/self-hosted.mdx @@ -7,7 +7,7 @@ description: Fern supports self-hosting SDK generation so that you can run SDK g -Fern SDK generation [runs on Fern's infrastructure by default](/sdks/overview/how-it-works). Self-hosting allows you to run SDK generation on your own infrastructure. Use self-hosting if your organization: +Fern SDK generation [runs on Fern's infrastructure by default](/learn/sdks/overview/how-it-works). Self-hosting allows you to run SDK generation on your own infrastructure. Use self-hosting if your organization: - Operates without internet access - Has strict compliance or security requirements @@ -33,8 +33,8 @@ Each machine that runs `fern generate --local` needs: This page assumes that you have: -* An initialized `fern` folder. See [Set up the `fern` folder](/sdks/overview/quickstart). -* SDK generators configured in `generators.yml`. See language-specific quickstarts: [TypeScript](/sdks/generators/typescript/quickstart), [Python](/sdks/generators/python/quickstart), [Go](/sdks/generators/go/quickstart), [Java](/sdks/generators/java/quickstart), etc. +* An initialized `fern` folder. See [Set up the `fern` folder](/learn/sdks/overview/quickstart). +* SDK generators configured in `generators.yml`. See language-specific quickstarts: [TypeScript](/learn/sdks/generators/typescript/quickstart), [Python](/learn/sdks/generators/python/quickstart), [Go](/learn/sdks/generators/go/quickstart), [Java](/learn/sdks/generators/java/quickstart), etc. Self-hosted SDK generation allows you to output to your local file system or push directly to a GitHub repository you control. Follow these steps to set up and run local generation: diff --git a/fern/products/sdks/generators/csharp/quickstart.mdx b/fern/products/sdks/generators/csharp/quickstart.mdx index b1ff74e55e..0988ab7a17 100644 --- a/fern/products/sdks/generators/csharp/quickstart.mdx +++ b/fern/products/sdks/generators/csharp/quickstart.mdx @@ -59,7 +59,7 @@ fern generate --group csharp-sdk ``` - If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: + If you have multiple APIs, use the [`--api` flag](/learn/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: ```bash fern generate --group csharp-sdk --api your-api-name diff --git a/fern/products/sdks/generators/go/configuration.mdx b/fern/products/sdks/generators/go/configuration.mdx index e480de85fa..d82d4fc39d 100644 --- a/fern/products/sdks/generators/go/configuration.mdx +++ b/fern/products/sdks/generators/go/configuration.mdx @@ -59,7 +59,7 @@ When enabled, the generated SDK sends a single structured `User-Agent` header of -Generates [mock server (wire) tests](/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends the correct HTTP requests and correctly handles responses per the API spec. When enabled, Docker is required as a runtime dependency to run the generated tests. +Generates [mock server (wire) tests](/learn/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends the correct HTTP requests and correctly handles responses per the API spec. When enabled, Docker is required as a runtime dependency to run the generated tests. diff --git a/fern/products/sdks/generators/go/quickstart.mdx b/fern/products/sdks/generators/go/quickstart.mdx index f9a6154a17..4cf5fd1534 100644 --- a/fern/products/sdks/generators/go/quickstart.mdx +++ b/fern/products/sdks/generators/go/quickstart.mdx @@ -59,7 +59,7 @@ fern generate --group go-sdk ``` - If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: + If you have multiple APIs, use the [`--api` flag](/learn/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: ```bash fern generate --group go-sdk --api your-api-name diff --git a/fern/products/sdks/generators/java/configuration.mdx b/fern/products/sdks/generators/java/configuration.mdx index 1e8cb8e54f..7a914032f6 100644 --- a/fern/products/sdks/generators/java/configuration.mdx +++ b/fern/products/sdks/generators/java/configuration.mdx @@ -79,7 +79,7 @@ When enabled, generates public constructors for model types. -When enabled, generates [mock server (wire) tests](/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends and receives HTTP requests as expected. +When enabled, generates [mock server (wire) tests](/learn/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends and receives HTTP requests as expected. diff --git a/fern/products/sdks/generators/java/publishing-to-maven-central.mdx b/fern/products/sdks/generators/java/publishing-to-maven-central.mdx index c7df0ff56c..d7352786ef 100644 --- a/fern/products/sdks/generators/java/publishing-to-maven-central.mdx +++ b/fern/products/sdks/generators/java/publishing-to-maven-central.mdx @@ -16,7 +16,7 @@ page, you'll have a versioned package published on Maven Central. ## Configure Maven Central publication -You'll need to update your `generators.yml` file to configure the output location, target repository, and publishing mode. Your `generators.yml` [should live in your source repository](/sdks/overview/project-structure) (or on your local machine), not the repository that contains your Java SDK code. +You'll need to update your `generators.yml` file to configure the output location, target repository, and publishing mode. Your `generators.yml` [should live in your source repository](/learn/sdks/overview/project-structure) (or on your local machine), not the repository that contains your Java SDK code. diff --git a/fern/products/sdks/generators/java/quickstart.mdx b/fern/products/sdks/generators/java/quickstart.mdx index 31427dd822..82af101ba3 100644 --- a/fern/products/sdks/generators/java/quickstart.mdx +++ b/fern/products/sdks/generators/java/quickstart.mdx @@ -59,7 +59,7 @@ fern generate --group java-sdk ``` - If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: + If you have multiple APIs, use the [`--api` flag](/learn/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: ```bash fern generate --group java-sdk --api your-api-name diff --git a/fern/products/sdks/generators/php/configuration.mdx b/fern/products/sdks/generators/php/configuration.mdx index b330555d07..16b425ef76 100644 --- a/fern/products/sdks/generators/php/configuration.mdx +++ b/fern/products/sdks/generators/php/configuration.mdx @@ -31,7 +31,7 @@ Allows customization of the generated `composer.json` file contents. You can spe -When enabled, generates [mock server (wire) tests](/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends and receives HTTP requests as expected. +When enabled, generates [mock server (wire) tests](/learn/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends and receives HTTP requests as expected. diff --git a/fern/products/sdks/generators/php/quickstart.mdx b/fern/products/sdks/generators/php/quickstart.mdx index 70a9838580..f251a200d7 100644 --- a/fern/products/sdks/generators/php/quickstart.mdx +++ b/fern/products/sdks/generators/php/quickstart.mdx @@ -59,7 +59,7 @@ fern generate --group php-sdk ``` - If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: + If you have multiple APIs, use the [`--api` flag](/learn/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: ```bash fern generate --group php-sdk --api your-api-name diff --git a/fern/products/sdks/generators/python/configuration.mdx b/fern/products/sdks/generators/python/configuration.mdx index ab2ed0a281..12040ca7df 100644 --- a/fern/products/sdks/generators/python/configuration.mdx +++ b/fern/products/sdks/generators/python/configuration.mdx @@ -70,7 +70,7 @@ The default number of retries for failed requests in the generated SDK. Set to ` -When enabled, generates [mock server (wire) tests](/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends and receives HTTP requests as expected. +When enabled, generates [mock server (wire) tests](/learn/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends and receives HTTP requests as expected. diff --git a/fern/products/sdks/generators/python/dynamic-authentication.mdx b/fern/products/sdks/generators/python/dynamic-authentication.mdx index b821705192..4810341f87 100644 --- a/fern/products/sdks/generators/python/dynamic-authentication.mdx +++ b/fern/products/sdks/generators/python/dynamic-authentication.mdx @@ -145,5 +145,5 @@ This same pattern works for other dynamic authentication scenarios: ## See also -- [Adding custom code](/sdks/generators/python/custom-code) - Python-specific customization guide -- [Python configuration](/sdks/generators/python/configuration) - Full list of configuration options +- [Adding custom code](/learn/sdks/generators/python/custom-code) - Python-specific customization guide +- [Python configuration](/learn/sdks/generators/python/configuration) - Full list of configuration options diff --git a/fern/products/sdks/generators/python/publishing-to-pypi.mdx b/fern/products/sdks/generators/python/publishing-to-pypi.mdx index 9c08507c67..1f6de7383d 100644 --- a/fern/products/sdks/generators/python/publishing-to-pypi.mdx +++ b/fern/products/sdks/generators/python/publishing-to-pypi.mdx @@ -33,7 +33,7 @@ Default to OIDC authentication unless the user has a specific reason to use toke ## Configure SDK package settings -Update your `generators.yml` file to configure the package name, output location, and client naming for PyPI publishing. Your `generators.yml` [should live in your source repository](/sdks/overview/project-structure) (or on your local machine), not the repository that contains your Python SDK code. +Update your `generators.yml` file to configure the package name, output location, and client naming for PyPI publishing. Your `generators.yml` [should live in your source repository](/learn/sdks/overview/project-structure) (or on your local machine), not the repository that contains your Python SDK code. diff --git a/fern/products/sdks/generators/python/quickstart.mdx b/fern/products/sdks/generators/python/quickstart.mdx index 3bb852b730..6cb2c9b9f8 100644 --- a/fern/products/sdks/generators/python/quickstart.mdx +++ b/fern/products/sdks/generators/python/quickstart.mdx @@ -55,7 +55,7 @@ fern generate --group python-sdk ``` - If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: + If you have multiple APIs, use the [`--api` flag](/learn/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: ```bash fern generate --group python-sdk --api your-api-name diff --git a/fern/products/sdks/generators/ruby/configuration.mdx b/fern/products/sdks/generators/ruby/configuration.mdx index 5367712ed8..4a155245e3 100644 --- a/fern/products/sdks/generators/ruby/configuration.mdx +++ b/fern/products/sdks/generators/ruby/configuration.mdx @@ -51,7 +51,7 @@ The content supports template variables like `{{ packageName }}` that are replac -When enabled, generates [mock server (wire) tests](/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends and receives HTTP requests as expected. +When enabled, generates [mock server (wire) tests](/learn/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends and receives HTTP requests as expected. diff --git a/fern/products/sdks/generators/ruby/quickstart.mdx b/fern/products/sdks/generators/ruby/quickstart.mdx index 9e9edac83c..f1b5709a0b 100644 --- a/fern/products/sdks/generators/ruby/quickstart.mdx +++ b/fern/products/sdks/generators/ruby/quickstart.mdx @@ -59,7 +59,7 @@ fern generate --group ruby-sdk ``` - If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: + If you have multiple APIs, use the [`--api` flag](/learn/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: ```bash fern generate --group ruby-sdk --api your-api-name diff --git a/fern/products/sdks/generators/swift/configuration.mdx b/fern/products/sdks/generators/swift/configuration.mdx index 20b8c352c7..a084922c45 100644 --- a/fern/products/sdks/generators/swift/configuration.mdx +++ b/fern/products/sdks/generators/swift/configuration.mdx @@ -37,7 +37,7 @@ The default number of retries for failed requests. When not set, the generated S -Generates [mock server (wire) tests](/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends the correct HTTP requests and correctly handles responses per the API spec. +Generates [mock server (wire) tests](/learn/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends the correct HTTP requests and correctly handles responses per the API spec. diff --git a/fern/products/sdks/generators/typescript/configuration.mdx b/fern/products/sdks/generators/typescript/configuration.mdx index 1627630dae..7bf47bb8c6 100644 --- a/fern/products/sdks/generators/typescript/configuration.mdx +++ b/fern/products/sdks/generators/typescript/configuration.mdx @@ -21,7 +21,7 @@ groups: Allow fields that are not defined in object schemas. This only applies to serde. -See [TypeScript serde layer](/sdks/generators/typescript/serde-layer) for more information. +See [TypeScript serde layer](/learn/sdks/generators/typescript/serde-layer) for more information. @@ -391,7 +391,7 @@ Controls whether the serde layer is enabled for serialization/deserialization. When `noSerdeLayer: false`, the generated client includes custom serialization code that transforms property names to camelCase, validates requests/responses at runtime, and supports complex types. -See [TypeScript serde layer](/sdks/generators/typescript/serde-layer) for detailed guidance on when to enable this option. +See [TypeScript serde layer](/learn/sdks/generators/typescript/serde-layer) for detailed guidance on when to enable this option. @@ -440,7 +440,7 @@ config: email: developers@acmecorp.com ``` -You can also use `packageJson.exports` to register custom subpath exports (e.g. `import { myHelper } from "@acme/sdk/helper"`). The generator only auto-generates export entries for your API definition, so custom files need to be added manually—otherwise Node.js won't resolve subpath imports for them. See [Adding custom code](/sdks/generators/typescript/custom-code) for details. +You can also use `packageJson.exports` to register custom subpath exports (e.g. `import { myHelper } from "@acme/sdk/helper"`). The generator only auto-generates export entries for your API definition, so custom files need to be added manually—otherwise Node.js won't resolve subpath imports for them. See [Adding custom code](/learn/sdks/generators/typescript/custom-code) for details. @@ -536,7 +536,7 @@ The default is `web`. When `useBigInt` is set to `true`, a customized JSON serializer & deserializer is used that will preserve the precision of `bigint`'s, as opposed to the native `JSON.stringify` and `JSON.parse` function which converts `bigint`'s to number's losing precision. When combining `useBigInt` with our serialization layer (`noSerdeLayer: false`), both the request and response properties that are marked as `long` and `bigint` in OpenAPI/Fern spec, will consistently be `bigint`'s. -However, when disabling the serialization layer (`noSerdeLayer: true`), they will be typed as `number | bigint`. See [TypeScript serde layer](/sdks/generators/typescript/serde-layer) for more information. +However, when disabling the serialization layer (`noSerdeLayer: true`), they will be typed as `number | bigint`. See [TypeScript serde layer](/learn/sdks/generators/typescript/serde-layer) for more information. Here's an overview of what to expect from the generated types when combining `useBigInt` and `noSerdeLayer` with the following Fern definition: diff --git a/fern/products/sdks/generators/typescript/custom-code.mdx b/fern/products/sdks/generators/typescript/custom-code.mdx index 2bf6815d87..c355fb35c6 100644 --- a/fern/products/sdks/generators/typescript/custom-code.mdx +++ b/fern/products/sdks/generators/typescript/custom-code.mdx @@ -45,7 +45,7 @@ To get started adding custom code: -By default, the TypeScript generator only auto-generates `exports` entries in `package.json` for your API definition. If you want consumers to import your custom file via a dedicated subpath (e.g. `import { myHelper } from "@acme/sdk/helper"`), you must register it manually using [`packageJson.exports`](/sdks/generators/typescript/configuration#packagejson) in `generators.yml`: +By default, the TypeScript generator only auto-generates `exports` entries in `package.json` for your API definition. If you want consumers to import your custom file via a dedicated subpath (e.g. `import { myHelper } from "@acme/sdk/helper"`), you must register it manually using [`packageJson.exports`](/learn/sdks/generators/typescript/configuration#packagejson) in `generators.yml`: ```yaml {5-14} title="generators.yml" - name: fern-typescript-sdk @@ -137,7 +137,7 @@ The export key (e.g., `"./helper"`) determines the import path your users will u -To add packages that your custom code requires, use the [`extraDependencies`](/sdks/generators/typescript/configuration#extraDependencies) and [`extraDevDependencies`](/sdks/generators/typescript/configuration#extraDevDependencies) options in your `generators.yml`. +To add packages that your custom code requires, use the [`extraDependencies`](/learn/sdks/generators/typescript/configuration#extraDependencies) and [`extraDevDependencies`](/learn/sdks/generators/typescript/configuration#extraDevDependencies) options in your `generators.yml`. ```yaml {4-7} title="generators.yml" - name: fern-typescript-sdk diff --git a/fern/products/sdks/generators/typescript/dynamic-authentication.mdx b/fern/products/sdks/generators/typescript/dynamic-authentication.mdx index 3e43eec295..46ca09ac3d 100644 --- a/fern/products/sdks/generators/typescript/dynamic-authentication.mdx +++ b/fern/products/sdks/generators/typescript/dynamic-authentication.mdx @@ -46,7 +46,7 @@ Add the `jsonwebtoken` dependency using the `packageJson` config option so it ge "@types/jsonwebtoken": "^9.0.0" ``` -See the [TypeScript configuration page](/sdks/generators/typescript/configuration#packagejson) for all available packageJson options. +See the [TypeScript configuration page](/learn/sdks/generators/typescript/configuration#packagejson) for all available packageJson options. ### Create a custom fetcher with JWT signing @@ -204,5 +204,5 @@ This same pattern works for other dynamic authentication scenarios: ## See also -- [Adding custom code](/sdks/generators/typescript/custom-code) - TypeScript-specific customization guide -- [TypeScript configuration](/sdks/generators/typescript/configuration) - Full list of configuration options +- [Adding custom code](/learn/sdks/generators/typescript/custom-code) - TypeScript-specific customization guide +- [TypeScript configuration](/learn/sdks/generators/typescript/configuration) - Full list of configuration options diff --git a/fern/products/sdks/generators/typescript/publishing-to-npm.mdx b/fern/products/sdks/generators/typescript/publishing-to-npm.mdx index 520a624eb5..08f1543b7d 100644 --- a/fern/products/sdks/generators/typescript/publishing-to-npm.mdx +++ b/fern/products/sdks/generators/typescript/publishing-to-npm.mdx @@ -33,7 +33,7 @@ Default to OIDC authentication unless the user has a specific reason to use toke ## Configure SDK package settings -Update your `generators.yml` file to configure the package name, output location, and client naming for npm publishing. Your `generators.yml` [should live in your source repository](/sdks/overview/project-structure) (or on your local machine), not the repository that contains your TypeScript SDK code. +Update your `generators.yml` file to configure the package name, output location, and client naming for npm publishing. Your `generators.yml` [should live in your source repository](/learn/sdks/overview/project-structure) (or on your local machine), not the repository that contains your TypeScript SDK code. diff --git a/fern/products/sdks/generators/typescript/quickstart.mdx b/fern/products/sdks/generators/typescript/quickstart.mdx index 904f088d8d..3e28b66fd2 100644 --- a/fern/products/sdks/generators/typescript/quickstart.mdx +++ b/fern/products/sdks/generators/typescript/quickstart.mdx @@ -58,7 +58,7 @@ fern generate --group ts-sdk ``` - If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: + If you have multiple APIs, use the [`--api` flag](/learn/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: ```bash fern generate --group ts-sdk --api your-api-name diff --git a/fern/products/sdks/generators/typescript/serde-layer.mdx b/fern/products/sdks/generators/typescript/serde-layer.mdx index 5fd6f1a406..ea562583f0 100644 --- a/fern/products/sdks/generators/typescript/serde-layer.mdx +++ b/fern/products/sdks/generators/typescript/serde-layer.mdx @@ -49,5 +49,5 @@ groups: useBigInt: true # Preserve precision for large numbers ``` -For the complete list of all TypeScript configuration options, go to [TypeScript configuration](/sdks/generators/typescript/configuration). +For the complete list of all TypeScript configuration options, go to [TypeScript configuration](/learn/sdks/generators/typescript/configuration). diff --git a/fern/products/sdks/how-it-works.mdx b/fern/products/sdks/how-it-works.mdx index b36d7a0c4e..81038b0cb2 100644 --- a/fern/products/sdks/how-it-works.mdx +++ b/fern/products/sdks/how-it-works.mdx @@ -6,7 +6,7 @@ description: Understand Fern's SDK generation process. Cloud-based workflow tran Fern combines your API specifications with generator configurations and custom code to produce SDKs in multiple languages. By default, SDK generation runs on Fern's managed cloud infrastructure. -Alternatively, [you can run SDK generation on your own infrastructure](/sdks/deep-dives/self-hosted) to meet specific security or compliance requirements. +Alternatively, [you can run SDK generation on your own infrastructure](/learn/sdks/deep-dives/self-hosted) to meet specific security or compliance requirements. ## Cloud generation workflow diff --git a/fern/products/sdks/introduction.mdx b/fern/products/sdks/introduction.mdx index a81d53d4c7..57ca62637b 100644 --- a/fern/products/sdks/introduction.mdx +++ b/fern/products/sdks/introduction.mdx @@ -16,7 +16,7 @@ description: Build multi-language SDKs with Fern's generator platform. Support T {/*

*/}
- + - + - + - + - + - +
PHP @@ -156,7 +156,7 @@ description: Build multi-language SDKs with Fern's generator platform. Support T
v
-
+ Changelog Changelog - + - +
Rust @@ -231,7 +231,7 @@ description: Build multi-language SDKs with Fern's generator platform. Support T
v
-
+ Changelog Changelog
@@ -276,15 +276,15 @@ description: Build multi-language SDKs with Fern's generator platform. Support T Generate client libraries in multiple languages from your API definition. -- [TypeScript](/sdks/generators/typescript/quickstart): Quickstart guide for generating a TypeScript SDK. -- [Python](/sdks/generators/python/quickstart): Quickstart guide for generating a Python SDK. -- [Go](/sdks/generators/go/quickstart): Quickstart guide for generating a Go SDK. -- [Java](/sdks/generators/java/quickstart): Quickstart guide for generating a Java SDK. -- [.NET](/sdks/generators/csharp/quickstart): Quickstart guide for generating a .NET SDK. -- [PHP](/sdks/generators/php/quickstart): Quickstart guide for generating a PHP SDK. +- [TypeScript](/learn/sdks/generators/typescript/quickstart): Quickstart guide for generating a TypeScript SDK. +- [Python](/learn/sdks/generators/python/quickstart): Quickstart guide for generating a Python SDK. +- [Go](/learn/sdks/generators/go/quickstart): Quickstart guide for generating a Go SDK. +- [Java](/learn/sdks/generators/java/quickstart): Quickstart guide for generating a Java SDK. +- [.NET](/learn/sdks/generators/csharp/quickstart): Quickstart guide for generating a .NET SDK. +- [PHP](/learn/sdks/generators/php/quickstart): Quickstart guide for generating a PHP SDK. - [Ruby](/learn/sdks/generators/ruby/quickstart): Quickstart guide for generating a Ruby SDK. -- [Swift](/sdks/generators/swift/quickstart): Quickstart guide for generating a Swift SDK. -- [Rust](/sdks/generators/rust/quickstart): Quickstart guide for generating a Rust SDK. +- [Swift](/learn/sdks/generators/swift/quickstart): Quickstart guide for generating a Swift SDK. +- [Rust](/learn/sdks/generators/rust/quickstart): Quickstart guide for generating a Rust SDK. - [C++](https://buildwithfern.com/book-demo?type=language-request): Request access for C++ SDK generation. - [Kotlin](https://buildwithfern.com/book-demo?type=language-request): Request access for Kotlin SDK generation. diff --git a/fern/products/sdks/project-structure.mdx b/fern/products/sdks/project-structure.mdx index ab1ec1435d..4aeaced495 100644 --- a/fern/products/sdks/project-structure.mdx +++ b/fern/products/sdks/project-structure.mdx @@ -62,7 +62,7 @@ The `fern.config.json` file stores your organization name and the Fern CLI versi ``` - When working with a locally installed CLI, set `version` to `"*"`. See [Install Fern CLI locally](/cli-api-reference/cli-reference/overview#install-fern-cli-locally) for details. + When working with a locally installed CLI, set `version` to `"*"`. See [Install Fern CLI locally](/learn/cli-api-reference/cli-reference/overview#install-fern-cli-locally) for details. ### `generators.yml` @@ -96,8 +96,8 @@ groups: See Cohere's [`generators.yml` file](https://github.com/cohere-ai/cohere-developer-experience/blob/23d6c541a01eb6b54dd9bb3588c805bb0e307713/fern/apis/sdks/generators.yml) and Vapi's [`generators.yml` file](https://github.com/VapiAI/docs/blob/9c674c2b16ba03e864e26673c5290c88048c9a7a/fern/apis/api/generators.yml). -See the [`generators.yml` reference page](/sdks/reference/generators-yml) for complete configuration options. +See the [`generators.yml` reference page](/learn/sdks/reference/generators-yml) for complete configuration options. ### API definition file -See [Project structure (API Definitions)](/api-definitions/overview/project-structure) for details on organizing your API definition files and working with multiple APIs. +See [Project structure (API Definitions)](/learn/api-definitions/overview/project-structure) for details on organizing your API definition files and working with multiple APIs. diff --git a/fern/products/sdks/reference/generators-yml-reference.mdx b/fern/products/sdks/reference/generators-yml-reference.mdx index 1fa9ebdb25..5692567e02 100644 --- a/fern/products/sdks/reference/generators-yml-reference.mdx +++ b/fern/products/sdks/reference/generators-yml-reference.mdx @@ -360,7 +360,7 @@ api: - Namespace for the specification. Useful for configuring a [single package with multiple API versions](/api-definitions/overview/project-structure#option-2-namespace-based-versioning). + Namespace for the specification. Useful for configuring a [single package with multiple API versions](/learn/api-definitions/overview/project-structure#option-2-namespace-based-versioning). @@ -664,23 +664,23 @@ groups: ``` -} href="/sdks/generators/typescript/configuration"> +} href="/learn/sdks/generators/typescript/configuration"> -} href="/sdks/generators/python/configuration"> +} href="/learn/sdks/generators/python/configuration"> -} href="/sdks/generators/go/configuration"> +} href="/learn/sdks/generators/go/configuration"> -} href="/sdks/generators/java/configuration"> +} href="/learn/sdks/generators/java/configuration"> -} href="/sdks/generators/csharp/configuration"> +} href="/learn/sdks/generators/csharp/configuration"> -} href="/sdks/generators/php/configuration"> +} href="/learn/sdks/generators/php/configuration"> -} href="/sdks/generators/ruby/configuration"> +} href="/learn/sdks/generators/ruby/configuration"> -} href="/sdks/generators/swift/configuration"> +} href="/learn/sdks/generators/swift/configuration"> -} href="/sdks/generators/rust/configuration"> +} href="/learn/sdks/generators/rust/configuration"> diff --git a/fern/products/sdks/snippets/custom-code-callout.mdx b/fern/products/sdks/snippets/custom-code-callout.mdx index 7cf2ce34a0..b05b180ead 100644 --- a/fern/products/sdks/snippets/custom-code-callout.mdx +++ b/fern/products/sdks/snippets/custom-code-callout.mdx @@ -1,2 +1,2 @@ -These steps cover adding a new custom file to the SDK. To preserve line-level edits to a generated file, use [Replay](/sdks/overview/custom-code#replay) instead. \ No newline at end of file +These steps cover adding a new custom file to the SDK. To preserve line-level edits to a generated file, use [Replay](/learn/sdks/overview/custom-code#replay) instead. \ No newline at end of file diff --git a/fern/products/sdks/snippets/github-publishing-mode.mdx b/fern/products/sdks/snippets/github-publishing-mode.mdx index 0951f9465c..bdaaba09a2 100644 --- a/fern/products/sdks/snippets/github-publishing-mode.mdx +++ b/fern/products/sdks/snippets/github-publishing-mode.mdx @@ -5,4 +5,4 @@ Optionally set the mode to control how Fern handles SDK publishing: - `mode: pull-request` (recommended): Fern generates code and creates a PR for you to review before release - `mode: push`: Fern generates code and pushes to a branch you specify for you to review before release -You can also configure other settings, like the reviewers or license. Refer to the [full `github` (`generators.yml`) reference](/sdks/reference/generators-yml#github) for more information. \ No newline at end of file +You can also configure other settings, like the reviewers or license. Refer to the [full `github` (`generators.yml`) reference](/learn/sdks/reference/generators-yml#github) for more information. \ No newline at end of file diff --git a/fern/products/sdks/snippets/oauth-params.mdx b/fern/products/sdks/snippets/oauth-params.mdx index 7fa5dc7bab..7af5476e78 100644 --- a/fern/products/sdks/snippets/oauth-params.mdx +++ b/fern/products/sdks/snippets/oauth-params.mdx @@ -1,6 +1,6 @@ - For OpenAPI, [OAuth must be configured in `generators.yml`](/api-definitions/openapi/authentication#oauth-client-credentials). + For OpenAPI, [OAuth must be configured in `generators.yml`](/learn/api-definitions/openapi/authentication#oauth-client-credentials). Configure OAuth 2.0 client credentials authentication. Optionally configure a `refresh-token` endpoint for token renewal without re-authentication. diff --git a/fern/products/sdks/snippets/readme-options.mdx b/fern/products/sdks/snippets/readme-options.mdx index 68b2ffbf88..613ab119a5 100644 --- a/fern/products/sdks/snippets/readme-options.mdx +++ b/fern/products/sdks/snippets/readme-options.mdx @@ -99,18 +99,18 @@ Define a custom section in the generated README for a specific SDK. | Language | Variable | Description | |----------|----------|-------------| - | TypeScript | `packageName` | Name of your package, as specified in the [`package-name` field](/sdks/generators/typescript/configuration#package-name) | - | Python | `packageName` | Name of your package, as specified in the [`package_name` field](/sdks/generators/python/configuration#package_name) | + | TypeScript | `packageName` | Name of your package, as specified in the [`package-name` field](/learn/sdks/generators/typescript/configuration#package-name) | + | Python | `packageName` | Name of your package, as specified in the [`package_name` field](/learn/sdks/generators/python/configuration#package_name) | | Go | `owner` | The owner of your Go module | - | Go | `repo` | The [repository](/sdks/generators/go/publishing#configure-output-location) where your Go module is published | + | Go | `repo` | The [repository](/learn/sdks/generators/go/publishing#configure-output-location) where your Go module is published | | Go | `version` | SDK version | - | Java | `group` | Maven `groupId` [from `coordinate` field](/sdks/generators/java/publishing#configure-maven-coordinate) | - | Java | `artifact` | Maven `artifactId` [from `coordinate` field](/sdks/generators/java/publishing#configure-maven-coordinate) | + | Java | `group` | Maven `groupId` [from `coordinate` field](/learn/sdks/generators/java/publishing#configure-maven-coordinate) | + | Java | `artifact` | Maven `artifactId` [from `coordinate` field](/learn/sdks/generators/java/publishing#configure-maven-coordinate) | | Java | `version` | SDK version | | C#/.NET | `packageName` | Name of your package, as specified in the [`package-id` field](/learn/sdks/generators/csharp/configuration#package-id) | - | PHP | `packageName` | Name of your package, as specified in the [`package-name` field](/sdks/generators/php/configuration#package-name) | - | Ruby | `packageName` | Name of your package, as specified in the [`package-name` field](/sdks/generators/ruby/configuration#package-name) | - | Swift | `gitUrl` | The [URL](/sdks/generators/swift/publishing#verify-package-availability) where your Swift package is published. For example, `https://github.com/fern-api/basic-swift-sdk` | + | PHP | `packageName` | Name of your package, as specified in the [`package-name` field](/learn/sdks/generators/php/configuration#package-name) | + | Ruby | `packageName` | Name of your package, as specified in the [`package-name` field](/learn/sdks/generators/ruby/configuration#package-name) | + | Swift | `gitUrl` | The [URL](/learn/sdks/generators/swift/publishing#verify-package-availability) where your Swift package is published. For example, `https://github.com/fern-api/basic-swift-sdk` | | Swift | `minVersion` | SDK version | diff --git a/fern/products/sdks/snippets/setup-fern-folder-callout.mdx b/fern/products/sdks/snippets/setup-fern-folder-callout.mdx index 001f5a9b62..5344ad7ce9 100644 --- a/fern/products/sdks/snippets/setup-fern-folder-callout.mdx +++ b/fern/products/sdks/snippets/setup-fern-folder-callout.mdx @@ -1,4 +1,4 @@ - This page assumes you have an initialized `fern` folder. See [Set up the `fern` folder](/sdks/overview/quickstart) if you haven't done this yet. + This page assumes you have an initialized `fern` folder. See [Set up the `fern` folder](/learn/sdks/overview/quickstart) if you haven't done this yet. \ No newline at end of file diff --git a/fern/snippets/default-version.mdx b/fern/snippets/default-version.mdx index 2b29dc79e7..1da0f2953b 100644 --- a/fern/snippets/default-version.mdx +++ b/fern/snippets/default-version.mdx @@ -2,5 +2,5 @@ Versions appear in a dropdown on your site in the order listed in `docs.yml`. The first version in your `versions` list is the default version and uses unversioned paths like `example.com/getting-started`. Other versions use versioned paths like `example.com/v2/getting-started`. - Fern automatically handles version routing by [redirecting](/docs/seo/redirects) broken versioned links to the default version. Canonical URLs point to the unversioned path to consolidate SEO signals. To override this for version-specific pages, see [SEO metadata](/learn/docs/seo/setting-seo-metadata#canonical-url). + Fern automatically handles version routing by [redirecting](/learn/docs/seo/redirects) broken versioned links to the default version. Canonical URLs point to the unversioned path to consolidate SEO signals. To override this for version-specific pages, see [SEO metadata](/learn/docs/seo/setting-seo-metadata#canonical-url). diff --git a/fern/snippets/openapi-specs.mdx b/fern/snippets/openapi-specs.mdx index ac63bedc4d..6310d0f933 100644 --- a/fern/snippets/openapi-specs.mdx +++ b/fern/snippets/openapi-specs.mdx @@ -76,7 +76,7 @@ api: - Namespace for the specification. Useful for configuring a [single package with multiple API versions](/api-definitions/overview/project-structure#option-2-namespace-based-versioning). + Namespace for the specification. Useful for configuring a [single package with multiple API versions](/learn/api-definitions/overview/project-structure#option-2-namespace-based-versioning). diff --git a/fern/translations/zh/products/api-def/ferndef/api-yml/global-configuration.mdx b/fern/translations/zh/products/api-def/ferndef/api-yml/global-configuration.mdx index 254e72809c..3f78a1c87e 100644 --- a/fern/translations/zh/products/api-def/ferndef/api-yml/global-configuration.mdx +++ b/fern/translations/zh/products/api-def/ferndef/api-yml/global-configuration.mdx @@ -18,7 +18,7 @@ headers: ``` -当您在 `api.yml` 中定义全局请求头时,必须[在端点示例中包含它们](/api-definitions/ferndef/examples#examples-with-headers)。 +当您在 `api.yml` 中定义全局请求头时,必须[在端点示例中包含它们](/learn/zh/api-definitions/ferndef/examples#examples-with-headers)。 ## 全局路径参数 @@ -56,7 +56,7 @@ service: ## 幂等性请求头 -配置幂等性请求头以定义 [SDK 用户](/learn/sdks/deep-dives/idempotency)可以为安全请求重试指定的请求头。您还必须[将每个端点标记为幂等](/learn/api-definitions/ferndef/endpoints/overview#idempotent-endpoints)才能公开这些请求头。当两者都配置时,Fern 生成的 SDK 会将这些请求头作为幂等端点调用的参数公开。 +配置幂等性请求头以定义 [SDK 用户](/learn/zh/sdks/deep-dives/idempotency)可以为安全请求重试指定的请求头。您还必须[将每个端点标记为幂等](/learn/zh/api-definitions/ferndef/endpoints/overview#idempotent-endpoints)才能公开这些请求头。当两者都配置时,Fern 生成的 SDK 会将这些请求头作为幂等端点调用的参数公开。 ```yaml title="api.yml" name: api @@ -66,4 +66,4 @@ idempotency-headers: Idempotency-Expiration: optional ``` -`idempotency-headers` 中的每个键都是 HTTP 请求头名称,值是类型。[SDK 用户](/learn/sdks/deep-dives/idempotency)然后可以在调用幂等端点时指定这些请求头。 +`idempotency-headers` 中的每个键都是 HTTP 请求头名称,值是类型。[SDK 用户](/learn/zh/sdks/deep-dives/idempotency)然后可以在调用幂等端点时指定这些请求头。 diff --git a/fern/translations/zh/products/api-def/ferndef/audiences.mdx b/fern/translations/zh/products/api-def/ferndef/audiences.mdx index 8732b35988..f044537f5d 100644 --- a/fern/translations/zh/products/api-def/ferndef/audiences.mdx +++ b/fern/translations/zh/products/api-def/ferndef/audiences.mdx @@ -6,7 +6,7 @@ noindex: true -受众是一个用于为不同消费者分段 API 的有用工具。您可以配置 Fern Docs 来发布特定于某个`受众`的文档。您也可以[在 OpenAPI 规范中使用受众](/learn/api-definitions/openapi/extensions/audiences)。 +受众是一个用于为不同消费者分段 API 的有用工具。您可以配置 Fern Docs 来发布特定于某个`受众`的文档。您也可以[在 OpenAPI 规范中使用受众](/learn/zh/api-definitions/openapi/extensions/audiences)。 受众的常见示例包括: diff --git a/fern/translations/zh/products/api-def/ferndef/auth.mdx b/fern/translations/zh/products/api-def/ferndef/auth.mdx index 1190e368a0..41a628d177 100644 --- a/fern/translations/zh/products/api-def/ferndef/auth.mdx +++ b/fern/translations/zh/products/api-def/ferndef/auth.mdx @@ -238,7 +238,7 @@ service: response: TokenResponse ``` -如果您的 OAuth 服务器托管在与主 API 不同的 URL 上,您可以使用[每个环境多 URL](/api-definitions/ferndef/api-yml/environments#multiple-urls-per-environment) 来为身份验证和 API 调用指定单独的基础 URL。 +如果您的 OAuth 服务器托管在与主 API 不同的 URL 上,您可以使用[每个环境多 URL](/learn/zh/api-definitions/ferndef/api-yml/environments#multiple-urls-per-environment) 来为身份验证和 API 调用指定单独的基础 URL。 有了这些设置,所有 OAuth 逻辑会在生成的 SDK 中自动处理。只要您配置了这些设置,您的客户端将自动检索访问令牌并根据需要刷新它。 diff --git a/fern/translations/zh/products/api-def/ferndef/availability.mdx b/fern/translations/zh/products/api-def/ferndef/availability.mdx index 715a8f9388..f72a60fb6c 100644 --- a/fern/translations/zh/products/api-def/ferndef/availability.mdx +++ b/fern/translations/zh/products/api-def/ferndef/availability.mdx @@ -4,7 +4,7 @@ description: 向 Fern Definition API 服务、端点、类型或属性添加可 noindex: true --- -您可以在 Fern Definition 中向端点、类型或属性添加 `availability`。您可以在 [`docs.yml` 文件](/learn/docs/configuration/site-level-settings)中配置 API Reference 文档中各部分的 `availability`。 +您可以在 Fern Definition 中向端点、类型或属性添加 `availability`。您可以在 [`docs.yml` 文件](/learn/zh/docs/configuration/site-level-settings)中配置 API Reference 文档中各部分的 `availability`。 ## 端点、类型和属性 diff --git a/fern/translations/zh/products/api-def/ferndef/endpoints.mdx b/fern/translations/zh/products/api-def/ferndef/endpoints.mdx index 0060230985..cc6e527596 100644 --- a/fern/translations/zh/products/api-def/ferndef/endpoints.mdx +++ b/fern/translations/zh/products/api-def/ferndef/endpoints.mdx @@ -12,7 +12,7 @@ noindex: true 每个服务定义: 1. **base-path(基础路径)**:所有端点 HTTP 路径的通用前缀 -2. 服务是否需要[身份验证](/learn/api-definitions/ferndef/authentication) +2. 服务是否需要[身份验证](/learn/zh/api-definitions/ferndef/authentication) 3. **Endpoints(端点)** @@ -30,7 +30,7 @@ noindex: true ### 节显示名称 -默认情况下,API 参考中的节名称来自服务文件名(例如,`user.yml` 变成"User")。要覆盖节的显示名称,[在您的 `docs.yml` 中使用 `section` 属性](/docs/api-references/customize-api-reference-layout#renaming-sections)。 +默认情况下,API 参考中的节名称来自服务文件名(例如,`user.yml` 变成"User")。要覆盖节的显示名称,[在您的 `docs.yml` 中使用 `section` 属性](/learn/zh/docs/api-references/customize-api-reference-layout#renaming-sections)。 ### SDK 方法名称 @@ -85,7 +85,7 @@ service: 端点的完整路径是以下内容的连接: -- [环境](/learn/api-definitions/ferndef/api-yml/environments) URL +- [环境](/learn/zh/api-definitions/ferndef/api-yml/environments) URL - 服务 `base-path` - 端点 `path` @@ -333,7 +333,7 @@ types: ### 分页 -Fern 支持偏移、游标、URI 和基于路径的分页方案。要在[生成的 SDK](/learn/sdks/deep-dives/auto-pagination) 中设置自动分页: +Fern 支持偏移、游标、URI 和基于路径的分页方案。要在[生成的 SDK](/learn/zh/sdks/deep-dives/auto-pagination) 中设置自动分页: 1. 使用 `pagination` 字段标注所需的分页端点 1. 指定分页方案(`offset`、`cursor`、`next_uri` 或 `next_path`) @@ -447,7 +447,7 @@ types: ### 幂等端点 -将端点标记为幂等,以允许 SDK 用户为安全请求重试指定幂等性头。您还必须在 [`api.yml` 中配置幂等性头](/learn/api-definitions/ferndef/api-yml/global-headers#idempotency-headers) 来定义哪些头可用。 +将端点标记为幂等,以允许 SDK 用户为安全请求重试指定幂等性头。您还必须在 [`api.yml` 中配置幂等性头](/learn/zh/api-definitions/ferndef/api-yml/global-headers#idempotency-headers) 来定义哪些头可用。 ```yaml title="service.yml" {8} service: @@ -494,7 +494,7 @@ errors: ``` -您可以在[错误](/learn/api-definitions/ferndef/errors)页面了解更多关于如何定义错误的信息。 +您可以在[错误](/learn/zh/api-definitions/ferndef/errors)页面了解更多关于如何定义错误的信息。 ## 指定示例 diff --git a/fern/translations/zh/products/api-def/ferndef/examples.mdx b/fern/translations/zh/products/api-def/ferndef/examples.mdx index 958fe87e97..442a5328e4 100644 --- a/fern/translations/zh/products/api-def/ferndef/examples.mdx +++ b/fern/translations/zh/products/api-def/ferndef/examples.mdx @@ -315,7 +315,7 @@ errors: ### 包含请求头的示例 -当您在 `api.yml` 中[定义了全局请求头](/api-definitions/ferndef/api-yml/global-headers#global-headers)时,必须在示例中包含它们: +当您在 `api.yml` 中[定义了全局请求头](/learn/zh/api-definitions/ferndef/api-yml/global-headers#global-headers)时,必须在示例中包含它们: ```yml {15-16} service: diff --git a/fern/translations/zh/products/api-def/ferndef/export-openapi.mdx b/fern/translations/zh/products/api-def/ferndef/export-openapi.mdx index a519b499e7..2aad1e6288 100644 --- a/fern/translations/zh/products/api-def/ferndef/export-openapi.mdx +++ b/fern/translations/zh/products/api-def/ferndef/export-openapi.mdx @@ -4,7 +4,7 @@ description: 使用 fern export 命令将 Fern Definition 导出为 OpenAPI 3.1 noindex: true --- -为了防止锁定在 Fern Definition 格式中,您可以随时[使用 `fern export` 命令](/cli-api-reference/cli-reference/commands#fern-export)将您的 API 定义导出为 OpenAPI 3.1。 +为了防止锁定在 Fern Definition 格式中,您可以随时[使用 `fern export` 命令](/learn/zh/cli-api-reference/cli-reference/commands#fern-export)将您的 API 定义导出为 OpenAPI 3.1。 如果您在 `fern/apis/` 文件夹中定义了多个 API,请使用 `--api` 指定要导出的 API。 diff --git a/fern/translations/zh/products/api-def/ferndef/overview.mdx b/fern/translations/zh/products/api-def/ferndef/overview.mdx index 29ce01b2e3..747b9bc84a 100644 --- a/fern/translations/zh/products/api-def/ferndef/overview.mdx +++ b/fern/translations/zh/products/api-def/ferndef/overview.mdx @@ -33,10 +33,10 @@ fern init 每个 Fern Definition 文件可以定义: -- **[自定义类型](/learn/api-definitions/ferndef/types)**。使用**自定义类型**来构建你的数据模型。 -- **[端点](/learn/api-definitions/ferndef/endpoints/overview)**。一个**服务**是一组相关的 REST 端点。 -- **[错误](/learn/api-definitions/ferndef/errors)**。一个**错误**表示来自端点的失败(非 200)响应。 -- **[导入](/learn/api-definitions/ferndef/imports)**。使用**导入**在文件间共享类型。 +- **[自定义类型](/learn/zh/api-definitions/ferndef/types)**。使用**自定义类型**来构建你的数据模型。 +- **[端点](/learn/zh/api-definitions/ferndef/endpoints/overview)**。一个**服务**是一组相关的 REST 端点。 +- **[错误](/learn/zh/api-definitions/ferndef/errors)**。一个**错误**表示来自端点的失败(非 200)响应。 +- **[导入](/learn/zh/api-definitions/ferndef/imports)**。使用**导入**在文件间共享类型。 ```yml imdb.yml maxLines=0 service: @@ -99,5 +99,5 @@ Conjure。这些公司放弃了 OpenAPI,选择了更简洁的 API Definition L 尽管是描述 API 的不同格式,**你永远不会被锁定在 Fern 中。** 将你的 - [Fern Definition 转换为 OpenAPI](/learn/api-definitions/ferndef/export-openapi) 很容易。 + [Fern Definition 转换为 OpenAPI](/learn/zh/api-definitions/ferndef/export-openapi) 很容易。 diff --git a/fern/translations/zh/products/api-def/ferndef/packages.mdx b/fern/translations/zh/products/api-def/ferndef/packages.mdx index e1313dadd8..afcc171191 100644 --- a/fern/translations/zh/products/api-def/ferndef/packages.mdx +++ b/fern/translations/zh/products/api-def/ferndef/packages.mdx @@ -39,7 +39,7 @@ client.roles.admin.get(); ## 包配置 -每个包可以有一个名为 `__package__.yml` 的特殊定义文件。与任何其他定义文件一样,它可以包含[导入](/learn/api-definitions/ferndef/imports)、[类型](/learn/api-definitions/ferndef/types)、[端点](/learn/api-definitions/ferndef/endpoints/overview)和[错误](/learn/api-definitions/ferndef/errors)。 +每个包可以有一个名为 `__package__.yml` 的特殊定义文件。与任何其他定义文件一样,它可以包含[导入](/learn/zh/api-definitions/ferndef/imports)、[类型](/learn/zh/api-definitions/ferndef/types)、[端点](/learn/zh/api-definitions/ferndef/endpoints/overview)和[错误](/learn/zh/api-definitions/ferndef/errors)。 `__package__.yml` 中的端点将出现在包的根目录。 例如,以下生成的 SDK: diff --git a/fern/translations/zh/products/api-def/ferndef/types.mdx b/fern/translations/zh/products/api-def/ferndef/types.mdx index cd184f74d9..2b6c4d77bc 100644 --- a/fern/translations/zh/products/api-def/ferndef/types.mdx +++ b/fern/translations/zh/products/api-def/ferndef/types.mdx @@ -24,7 +24,7 @@ noindex: true | `map` | 键值映射,例如:`map` | | `optional` | 可选值,例如:`optional` | | `literal` | 字面值,例如:`literal<"Plants">` | -| `file` | 文件上传类型,例如:[文件上传](/learn/api-definitions/ferndef/endpoints/multipart) | +| `file` | 文件上传类型,例如:[文件上传](/learn/zh/api-definitions/ferndef/endpoints/multipart) | | `unknown` | 表示任意 JSON | ## 自定义类型 diff --git a/fern/translations/zh/products/api-def/ferndef/webhooks.mdx b/fern/translations/zh/products/api-def/ferndef/webhooks.mdx index cb480a2745..43ef1bb787 100644 --- a/fern/translations/zh/products/api-def/ferndef/webhooks.mdx +++ b/fern/translations/zh/products/api-def/ferndef/webhooks.mdx @@ -84,7 +84,7 @@ navigation: - subpackage_api.newPlantWebhook # Format: subpackage_{name-of-api}.{webhook-event-name} ``` -有关如何在 `docs.yml` 中配置 webhook 参考的更多信息,请参阅[生成您的 webhook 参考](/docs/api-references/generate-webhook-ref)。 +有关如何在 `docs.yml` 中配置 webhook 参考的更多信息,请参阅[生成您的 webhook 参考](/learn/zh/docs/api-references/generate-webhook-ref)。 ## SDK 签名验证 diff --git a/fern/translations/zh/products/api-def/ferndef/websockets.mdx b/fern/translations/zh/products/api-def/ferndef/websockets.mdx index 7d5d4a7110..ce51fc9281 100644 --- a/fern/translations/zh/products/api-def/ferndef/websockets.mdx +++ b/fern/translations/zh/products/api-def/ferndef/websockets.mdx @@ -91,7 +91,7 @@ WebSocket 使用户能够与服务器创建连接,通过该连接可以发送 ### WebSocket 参考 -Fern 为 WebSocket 渲染一个[独特的参考页面](/learn/docs/api-references/generate-websocket-ref)。**握手**部分概述了与服务器连接的协议,而**发送**和**接收**部分概述了客户端和服务器之间可以发送的消息架构。 +Fern 为 WebSocket 渲染一个[独特的参考页面](/learn/zh/docs/api-references/generate-websocket-ref)。**握手**部分概述了与服务器连接的协议,而**发送**和**接收**部分概述了客户端和服务器之间可以发送的消息架构。 用户可以直接在 API 参考中连接和使用 WebSocket(查看 Hume 的 WebSocket 之一[这里](https://dev.hume.ai/reference/text-to-speech-tts/stream-input))。 diff --git a/fern/translations/zh/products/api-def/grpc/overview.mdx b/fern/translations/zh/products/api-def/grpc/overview.mdx index a894080c2d..8db46149de 100644 --- a/fern/translations/zh/products/api-def/grpc/overview.mdx +++ b/fern/translations/zh/products/api-def/grpc/overview.mdx @@ -204,7 +204,7 @@ fern/ ``` -在您的 fern 目录中创建一个 `generators.yml` 文件,并添加对您的 gRPC proto 文件的引用。请参见 [gRPC generators.yml 参考](/api-definitions/grpc/generators-yml-reference)以获取完整的配置选项。 +在您的 fern 目录中创建一个 `generators.yml` 文件,并添加对您的 gRPC proto 文件的引用。请参见 [gRPC generators.yml 参考](/learn/zh/api-definitions/grpc/generators-yml-reference)以获取完整的配置选项。 ```yaml title="generators.yml" # Your API definition @@ -222,7 +222,7 @@ groups: ``` -如果您想要[本地编译 `.proto` 文件 (`local-generation: true`)](/learn/api-definitions/grpc/generators-yml-reference#local-generation),您必须在您的机器上或[在您的 CI/CD 环境中](/learn/api-definitions/grpc/sync-your-g-rpc-specification)安装 [buf](https://buf.build/docs/installation)。 +如果您想要[本地编译 `.proto` 文件 (`local-generation: true`)](/learn/zh/api-definitions/grpc/generators-yml-reference#local-generation),您必须在您的机器上或[在您的 CI/CD 环境中](/learn/zh/api-definitions/grpc/sync-your-g-rpc-specification)安装 [buf](https://buf.build/docs/installation)。 您的最终目录结构: diff --git a/fern/translations/zh/products/api-def/grpc/reference/generators-reference.mdx b/fern/translations/zh/products/api-def/grpc/reference/generators-reference.mdx index e8af65b59c..6843035a38 100644 --- a/fern/translations/zh/products/api-def/grpc/reference/generators-reference.mdx +++ b/fern/translations/zh/products/api-def/grpc/reference/generators-reference.mdx @@ -6,6 +6,6 @@ sidebar-title: gRPC generators.yml 参考 `generators.yml` 文件有两个作用:它声明你的 gRPC 规范位置(在 `api.specs` 部分),并配置 SDK 生成(在可选的 `groups` 部分)。 -在此声明的 API 可以通过 `docs.yml` 在你的文档中渲染。请参阅 [生成你的 API 参考](/learn/docs/api-references/overview)。 +在此声明的 API 可以通过 `docs.yml` 在你的文档中渲染。请参阅 [生成你的 API 参考](/learn/zh/docs/api-references/overview)。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/openapi/auth.mdx b/fern/translations/zh/products/api-def/openapi/auth.mdx index d672fd2b22..98c3473925 100644 --- a/fern/translations/zh/products/api-def/openapi/auth.mdx +++ b/fern/translations/zh/products/api-def/openapi/auth.mdx @@ -8,7 +8,7 @@ Fern 支持两种配置身份验证的方式: - **在您的 OpenAPI 规范中**使用 `securitySchemes` — 标准方法,保持认证配置的可移植性,并与其他 OpenAPI 工具兼容。 - **在 `generators.yml` 中**使用 `auth-schemes` — 使用此方式自定义参数名称和环境变量,覆盖规范中定义的内容,或配置 OAuth(在 OpenAPI 中不可用)。 -您的身份验证配置适用于生成的 SDK 和 [API 浏览器](/learn/docs/api-references/api-explorer)。所有 SDK 都支持凭证的直接配置和环境变量。如果您在两个地方定义了相同的方案,则以 `generators.yml` 为准。 +您的身份验证配置适用于生成的 SDK 和 [API 浏览器](/learn/zh/docs/api-references/api-explorer)。所有 SDK 都支持凭证的直接配置和环境变量。如果您在两个地方定义了相同的方案,则以 `generators.yml` 为准。 ## 在规范中配置身份验证 @@ -157,7 +157,7 @@ paths: ## 在 `generators.yml` 中自定义或覆盖身份验证 -在 [`auth-schemes`](/learn/sdks/reference/generators-yml#auth-schemes) 中定义您的方案,然后使用 [`api.auth`](/learn/sdks/reference/generators-yml#auth) 将其作为所有端点的默认值: +在 [`auth-schemes`](/learn/zh/sdks/reference/generators-yml#auth-schemes) 中定义您的方案,然后使用 [`api.auth`](/learn/zh/sdks/reference/generators-yml#auth) 将其作为所有端点的默认值: ```yml title="generators.yml" # 定义方案 @@ -175,7 +175,7 @@ api: - openapi: ./openapi.yml ``` -有关完整的配置选项,请参见 [`auth-schemes` 参考](/learn/sdks/reference/generators-yml#auth-schemes)。您还可以[为特定 SDK 覆盖身份验证设置](/learn/sdks/reference/generators-yml#override-api-authentication-settings)。 +有关完整的配置选项,请参见 [`auth-schemes` 参考](/learn/zh/sdks/reference/generators-yml#auth-schemes)。您还可以[为特定 SDK 覆盖身份验证设置](/learn/zh/sdks/reference/generators-yml#override-api-authentication-settings)。 生成的 SDK 用法: @@ -217,7 +217,7 @@ auth-schemes: env: MY_CLIENT_SECRET ``` -在 `username` 或 `password` 上[设置 `omit: true`](/learn/sdks/reference/generators-yml#usernameomit-passwordomit) 以从生成的 SDK 中移除它。 +在 `username` 或 `password` 上[设置 `omit: true`](/learn/zh/sdks/reference/generators-yml#usernameomit-passwordomit) 以从生成的 SDK 中移除它。 @@ -266,7 +266,7 @@ auth-schemes: `endpoint` 值引用您的 OpenAPI 规范中的路径。当返回 `expires-in` 时,SDK 会在 token 过期前自动刷新。 -如果您的 API 使用[命名空间](/learn/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis)(多个 API 规范),请在端点前加上命名空间和 `::`。例如,`"payments::POST /oauth/token"`。 +如果您的 API 使用[命名空间](/learn/zh/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis)(多个 API 规范),请在端点前加上命名空间和 `::`。例如,`"payments::POST /oauth/token"`。 diff --git a/fern/translations/zh/products/api-def/openapi/automation.mdx b/fern/translations/zh/products/api-def/openapi/automation.mdx index e4bf2b2ee5..c295a3964a 100644 --- a/fern/translations/zh/products/api-def/openapi/automation.mdx +++ b/fern/translations/zh/products/api-def/openapi/automation.mdx @@ -20,7 +20,7 @@ sidebar-title: 同步您的 OpenAPI 规范 ``` - 在您的仓库中创建 `.github/workflows/sync-openapi.yml`。此操作使用 [`fern api update`](/cli-api-reference/cli-reference/commands#fern-api-update) 从您的 `generators.yml` 文件中的 `origin` 字段拉取最新版本的 OpenAPI 规范。 + 在您的仓库中创建 `.github/workflows/sync-openapi.yml`。此操作使用 [`fern api update`](/learn/zh/cli-api-reference/cli-reference/commands#fern-api-update) 从您的 `generators.yml` 文件中的 `origin` 字段拉取最新版本的 OpenAPI 规范。 ```yml title=".github/workflows/sync-openapi.yml" name: Sync OpenAPI Specs # 可以自定义 diff --git a/fern/translations/zh/products/api-def/openapi/extensions/audiences.mdx b/fern/translations/zh/products/api-def/openapi/extensions/audiences.mdx index 5f51778909..b67ad3e98f 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/audiences.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/audiences.mdx @@ -12,13 +12,13 @@ Fern 提供两种方式来筛选哪些 API 元素会出现在您的 SDK 和 API - **`audiences`(基于标签的筛选):** 为特定端点、模式或属性标记受众标签,然后将 SDK 和文档筛选到这些标签。最适合基于用户类型(公共 vs beta、免费 vs 企业版)或功能成熟度创建变体,无论 URL 结构如何。 -- **`settings.filter`(基于路径的筛选):** 筛选整个 URL 路径或模式。最适合您的 API 组织自然按 URL 划分的情况(如 `/v1/*` vs `/v2/*`,或 `/admin/*` vs `/user/*`)。配置详细信息请参见 [`settings.filter` 参考](/learn/sdks/reference/generators-yml#openapi)。 +- **`settings.filter`(基于路径的筛选):** 筛选整个 URL 路径或模式。最适合您的 API 组织自然按 URL 划分的情况(如 `/v1/*` vs `/v2/*`,或 `/admin/*` vs `/user/*`)。配置详细信息请参见 [`settings.filter` 参考](/learn/zh/sdks/reference/generators-yml#openapi)。 许多团队同时使用这两种方法:基于路径的筛选用于主要划分,受众标签用于这些划分内的精细控制。 ## 基于路径的筛选 -在您的 `generators.yml` 中使用 [`settings.filter`](/learn/api-definitions/openapi/generators-yml-reference#settingsfilter) 来限制哪些端点会根据其路径包含在生成的 SDK 或 API 参考中: +在您的 `generators.yml` 中使用 [`settings.filter`](/learn/zh/api-definitions/openapi/generators-yml-reference#settingsfilter) 来限制哪些端点会根据其路径包含在生成的 SDK 或 API 参考中: ```yaml title="generators.yml" api: diff --git a/fern/translations/zh/products/api-def/openapi/extensions/availability.mdx b/fern/translations/zh/products/api-def/openapi/extensions/availability.mdx index c7de6cad45..c71152d6f8 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/availability.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/availability.mdx @@ -5,9 +5,9 @@ description: 使用 `x-fern-availability` 在 OpenAPI 中标记 API 端点可用 --- -`x-fern-availability` 扩展用于在您的 OpenAPI 定义中标记端点的可用性。可用性信息会传播到生成的 Fern Docs 网站中,显示为视觉标签、SDK 和 [CLI](/learn/cli-generator/get-started/openapi-extensions#availability-badges)。 +`x-fern-availability` 扩展用于在您的 OpenAPI 定义中标记端点的可用性。可用性信息会传播到生成的 Fern Docs 网站中,显示为视觉标签、SDK 和 [CLI](/learn/zh/cli-generator/get-started/openapi-extensions#availability-badges)。 -您可以在 [`docs.yml` 文件](/learn/docs/configuration/site-level-settings) 中配置 API 参考文档部分的 `availability`。 +您可以在 [`docs.yml` 文件](/learn/zh/docs/configuration/site-level-settings) 中配置 API 参考文档部分的 `availability`。 ## 端点 diff --git a/fern/translations/zh/products/api-def/openapi/extensions/default.mdx b/fern/translations/zh/products/api-def/openapi/extensions/default.mdx index 466012347d..0f517cccd9 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/default.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/default.mdx @@ -4,7 +4,7 @@ headline: 默认值 (OpenAPI) description: 使用 `x-fern-default` 为生成的 SDK 中的路径、头部和查询参数设置客户端默认值。 --- -`x-fern-default` 扩展让你可以为路径、头部或查询参数指定客户端默认值,包括在 [`x-fern-global-headers`](/learn/api-definitions/openapi/extensions/global-headers) 下定义的头部。当存在此扩展时,生成的 SDK 会使参数变为可选,并在调用方省略时自动发送默认值。`x-fern-default` 支持 `string` 和 `boolean` 值;其他类型(如数字)会被忽略。 +`x-fern-default` 扩展让你可以为路径、头部或查询参数指定客户端默认值,包括在 [`x-fern-global-headers`](/learn/zh/api-definitions/openapi/extensions/global-headers) 下定义的头部。当存在此扩展时,生成的 SDK 会使参数变为可选,并在调用方省略时自动发送默认值。`x-fern-default` 支持 `string` 和 `boolean` 值;其他类型(如数字)会被忽略。 这对于固定 API 版本头部或区域路径参数非常有用,同时仍允许调用方覆盖该值。`x-fern-default` 在所有 SDK 语言中都受支持。 diff --git a/fern/translations/zh/products/api-def/openapi/extensions/examples.mdx b/fern/translations/zh/products/api-def/openapi/extensions/examples.mdx index 34b37d95b9..61e7bdf7d9 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/examples.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/examples.mdx @@ -8,14 +8,14 @@ og:title: OpenAPI 请求 + 响应示例 -Fern 使用 [AI 生成的示例](/learn/docs/ai-features/ai-examples) 自动生成真实的示例,默认启用。使用 `x-fern-examples` 手动定义特定的示例值。手动示例优先于 AI 生成的示例。您也可以[完全禁用 AI 示例](/learn/docs/configuration/site-level-settings#ai-examplesenabled)。 +Fern 使用 [AI 生成的示例](/learn/zh/docs/ai-features/ai-examples) 自动生成真实的示例,默认启用。使用 `x-fern-examples` 手动定义特定的示例值。手动示例优先于 AI 生成的示例。您也可以[完全禁用 AI 示例](/learn/zh/docs/configuration/site-level-settings#ai-examplesenabled)。 -当您需要关联特定的请求和响应对,或为端点定义多个命名示例时,请使用 `x-fern-examples`。虽然 OpenAPI 有多个示例字段,但它无法将请求与其对应的响应关联起来。如果您需要您的示例与非 Fern 的 OpenAPI 工具兼容,请使用 [`fern api enrich`](/learn/cli-api-reference/cli-reference/commands#fern-api-enrich) 将 `x-fern-examples` 转换为原生 OpenAPI 示例字段。 +当您需要关联特定的请求和响应对,或为端点定义多个命名示例时,请使用 `x-fern-examples`。虽然 OpenAPI 有多个示例字段,但它无法将请求与其对应的响应关联起来。如果您需要您的示例与非 Fern 的 OpenAPI 工具兼容,请使用 [`fern api enrich`](/learn/zh/cli-api-reference/cli-reference/commands#fern-api-enrich) 将 `x-fern-examples` 转换为原生 OpenAPI 示例字段。 `x-fern-examples` 是一个数组,其中每个元素可以包含关联的 `path-parameters`、`query-parameters`、`headers`、`request` 和 `response` 值。可选地,添加 `name` 字段为每个示例提供描述性标签。 -如果您[通过 `x-fern-global-headers` 扩展定义了全局标头](/api-definitions/openapi/extensions/global-headers),您必须在示例中包含这些标头。 +如果您[通过 `x-fern-global-headers` 扩展定义了全局标头](/learn/zh/api-definitions/openapi/extensions/global-headers),您必须在示例中包含这些标头。 按以下方式构造 `request` 和 `response`: diff --git a/fern/translations/zh/products/api-def/openapi/extensions/explorer.mdx b/fern/translations/zh/products/api-def/openapi/extensions/explorer.mdx index 2adceddb53..2705f8cc01 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/explorer.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/explorer.mdx @@ -5,7 +5,7 @@ description: 使用 `x-fern-explorer` 启用或禁用 API Explorer sidebar-title: API Explorer 控制 --- -[API Explorer](/learn/docs/api-references/api-explorer) 默认为所有端点启用。使用 `x-fern-explorer` 全局禁用或按操作覆盖。这通常用于对破坏性操作、支付处理或仅限管理员的端点禁用 Explorer。 +[API Explorer](/learn/zh/docs/api-references/api-explorer) 默认为所有端点启用。使用 `x-fern-explorer` 全局禁用或按操作覆盖。这通常用于对破坏性操作、支付处理或仅限管理员的端点禁用 Explorer。 ## 全局 diff --git a/fern/translations/zh/products/api-def/openapi/extensions/global-headers.mdx b/fern/translations/zh/products/api-def/openapi/extensions/global-headers.mdx index f2ab7cbbfb..32b7405eca 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/global-headers.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/global-headers.mdx @@ -30,12 +30,12 @@ x-fern-global-headers: ``` - 当您使用 `x-fern-global-headers` 定义全局请求头时,您必须[在 `x-fern-examples` 中包含它们](/api-definitions/openapi/extensions/request-response-examples)。 + 当您使用 `x-fern-global-headers` 定义全局请求头时,您必须[在 `x-fern-examples` 中包含它们](/learn/zh/api-definitions/openapi/extensions/request-response-examples)。 ### 默认值 -使用 [`x-fern-default`](/learn/api-definitions/openapi/extensions/default-values) 为全局请求头设置客户端默认值。生成的 SDK 会将请求头设置为可选,并在调用者省略时发送默认值: +使用 [`x-fern-default`](/learn/zh/api-definitions/openapi/extensions/default-values) 为全局请求头设置客户端默认值。生成的 SDK 会将请求头设置为可选,并在调用者省略时发送默认值: ```yaml {4} title="openapi.yml" x-fern-global-headers: @@ -46,7 +46,7 @@ x-fern-global-headers: ## 在 `generators.yml` 中 -或者,您可以将请求头添加到[`generators.yml` 文件中的 `api` 块](/learn/sdks/reference/generators-yml#headers): +或者,您可以将请求头添加到[`generators.yml` 文件中的 `api` 块](/learn/zh/sdks/reference/generators-yml#headers): ```yaml title="generators.yml" api: diff --git a/fern/translations/zh/products/api-def/openapi/extensions/global-parameters.mdx b/fern/translations/zh/products/api-def/openapi/extensions/global-parameters.mdx index d67978d251..845701b95a 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/global-parameters.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/global-parameters.mdx @@ -6,7 +6,7 @@ description: 使用 `x-fern-global-parameters` 扩展声明在客户端级别设 **全局参数**是在 SDK 客户端级别或 CLI 配置级别设置一次,并注入到每个相关请求中的值,而不是在每次调用时传递。每次调用的值始终优先于全局值。 -全局参数与[全局请求头](/learn/api-definitions/openapi/extensions/global-headers)不同:全局请求头始终是 header,而全局参数可以目标为 header、query 参数、path 参数或请求体中的字段。 +全局参数与[全局请求头](/learn/zh/api-definitions/openapi/extensions/global-headers)不同:全局请求头始终是 header,而全局参数可以目标为 header、query 参数、path 参数或请求体中的字段。 ## 声明全局参数 @@ -53,7 +53,7 @@ x-fern-global-parameters: - 当调用者和环境变量都未提供值时使用的客户端默认值。[`x-fern-default`](/learn/api-definitions/openapi/extensions/default-values) 优先于 `default`。 + 当调用者和环境变量都未提供值时使用的客户端默认值。[`x-fern-default`](/learn/zh/api-definitions/openapi/extensions/default-values) 优先于 `default`。 @@ -103,4 +103,4 @@ paths: ## 生成的 CLI 行为 -[CLI 生成器](/learn/cli-generator/get-started/openapi-extensions#global-parameters)将每个全局参数注册为顶级标志(带有其 `env` 回退和 `default`),并将解析后的值注入到每个适用命令的声明位置。 +[CLI 生成器](/learn/zh/cli-generator/get-started/openapi-extensions#global-parameters)将每个全局参数注册为顶级标志(带有其 `env` 回退和 `default`),并将解析后的值注入到每个适用命令的声明位置。 diff --git a/fern/translations/zh/products/api-def/openapi/extensions/ignore.mdx b/fern/translations/zh/products/api-def/openapi/extensions/ignore.mdx index 18f6c32c99..0840bb6ed8 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/ignore.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/ignore.mdx @@ -62,7 +62,7 @@ paths: ``` -要在不修改基础规范的情况下跳过参数,请在您的[覆盖文件](/learn/api-definitions/openapi/overrides)中使用 `null` 值来删除参数: +要在不修改基础规范的情况下跳过参数,请在您的[覆盖文件](/learn/zh/api-definitions/openapi/overrides)中使用 `null` 值来删除参数: ```yaml title="overrides.yml" {5} paths: diff --git a/fern/translations/zh/products/api-def/openapi/extensions/method-names.mdx b/fern/translations/zh/products/api-def/openapi/extensions/method-names.mdx index fe52b4462a..d9b41eaf20 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/method-names.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/method-names.mdx @@ -4,7 +4,7 @@ headline: 自定义 SDK 方法名称 (OpenAPI) description: 使用 `x-fern-sdk-method-name` 和 `x-fern-sdk-group-name` 来精细调整 SDK 命名。 --- -使用 `x-fern-sdk-group-name` 和 `x-fern-sdk-method-name` 扩展来控制端点在您的 [SDK](/learn/sdks/overview/introduction) 和 [CLI](/learn/cli-generator/get-started/openapi-extensions) 中的组织方式。 +使用 `x-fern-sdk-group-name` 和 `x-fern-sdk-method-name` 扩展来控制端点在您的 [SDK](/learn/zh/sdks/overview/introduction) 和 [CLI](/learn/zh/cli-generator/get-started/openapi-extensions) 中的组织方式。 如果没有扩展存在,Fern 使用您的 operation ID 来生成 SDK 方法名称。将 operation ID 格式化为 `{tag_name}_{operation_name}`(例如:`users_get`)以自动生成类似 `users.get()` 的方法。如果 operation ID 不以 tag 开头,Fern 会直接将其用作方法名称。 diff --git a/fern/translations/zh/products/api-def/openapi/extensions/pagination.mdx b/fern/translations/zh/products/api-def/openapi/extensions/pagination.mdx index 86763662c8..29dbe004c6 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/pagination.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/pagination.mdx @@ -7,7 +7,7 @@ description: 使用 x-fern-pagination 扩展为列表端点配置自动分页 -`x-fern-pagination` 扩展为 OpenAPI 规范中的列表端点配置自动分页。[SDK](/learn/sdks/deep-dives/auto-pagination) 和 [CLI](/learn/cli-generator/get-started/openapi-extensions#pagination) 用户无需手动管理页面令牌即可获得自动分页功能。 +`x-fern-pagination` 扩展为 OpenAPI 规范中的列表端点配置自动分页。[SDK](/learn/zh/sdks/deep-dives/auto-pagination) 和 [CLI](/learn/zh/cli-generator/get-started/openapi-extensions#pagination) 用户无需手动管理页面令牌即可获得自动分页功能。 要配置分页: diff --git a/fern/translations/zh/products/api-def/openapi/extensions/tag-display-name.mdx b/fern/translations/zh/products/api-def/openapi/extensions/tag-display-name.mdx index 92d6e7f3bd..6be3e087cd 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/tag-display-name.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/tag-display-name.mdx @@ -41,8 +41,8 @@ paths: summary: List watering schedules ``` -您还可以在[覆盖文件](/learn/api-definitions/openapi/overrides)中设置显示名称。 +您还可以在[覆盖文件](/learn/zh/api-definitions/openapi/overrides)中设置显示名称。 - 或者,您也可以直接在[`docs.yml` 文件](/learn/docs/api-references/customize-api-reference-layout)中重命名章节。 + 或者,您也可以直接在[`docs.yml` 文件](/learn/zh/docs/api-references/customize-api-reference-layout)中重命名章节。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/openapi/overlays.mdx b/fern/translations/zh/products/api-def/openapi/overlays.mdx index b054977682..a6c51fca0d 100644 --- a/fern/translations/zh/products/api-def/openapi/overlays.mdx +++ b/fern/translations/zh/products/api-def/openapi/overlays.mdx @@ -6,7 +6,7 @@ description: 使用 OpenAPI 叠加层规范来自定义您的 OpenAPI 定义, 叠加层允许您在不修改原始文件的情况下自定义 OpenAPI 规范。这在以下情况下很有用: - 您的 API 规范是从服务器代码自动生成的 -- 您需要为 SDK、文档或[生成的 CLI](/learn/cli-generator/get-started/customization#overrides-and-overlays) 配置不同的设置 +- 您需要为 SDK、文档或[生成的 CLI](/learn/zh/cli-generator/get-started/customization#overrides-and-overlays) 配置不同的设置 - 您想要添加 Fern 配置,如分页或 SDK 方法名称 - 您想要使用 JSONPath 通配符对多个端点进行批量更改 @@ -15,7 +15,7 @@ description: 使用 OpenAPI 叠加层规范来自定义您的 OpenAPI 定义, Fern 推荐对 OpenAPI 规范使用叠加层而非覆盖。 - [覆盖](/learn/api-definitions/openapi/overrides) 也完全受支持。如果覆盖对您的团队有效,则无需切换。您也可以同时使用两者(先应用覆盖,再应用叠加层)。 + [覆盖](/learn/zh/api-definitions/openapi/overrides) 也完全受支持。如果覆盖对您的团队有效,则无需切换。您也可以同时使用两者(先应用覆盖,再应用叠加层)。 ## 配置叠加层 @@ -71,7 +71,7 @@ actions: -使用 `update` 添加 [Fern 扩展](/learn/api-definitions/openapi/extensions/overview): +使用 `update` 添加 [Fern 扩展](/learn/zh/api-definitions/openapi/extensions/overview): ```yaml title="openapi-overlays.yml" overlay: 1.0.0 diff --git a/fern/translations/zh/products/api-def/openapi/overview.mdx b/fern/translations/zh/products/api-def/openapi/overview.mdx index d80082ee3a..2ef6b970cb 100644 --- a/fern/translations/zh/products/api-def/openapi/overview.mdx +++ b/fern/translations/zh/products/api-def/openapi/overview.mdx @@ -104,8 +104,8 @@ components: 遵循这些最佳实践,确保您的 OpenAPI 规范生成高质量的 SDK 和文档: -- **使用合适的项目结构进行组织。** 按照[项目结构](/api-definitions/overview/project-structure)中的说明,清晰地组织包含您的定义和其他相关文件的目录。 -- **为端点添加 `operationId`。** 为每个端点包含清晰的 `operationId`,以控制在 SDK 中生成的函数名称。(或使用[扩展来自定义组和方法名称](/api-definitions/openapi/extensions/method-names)。) +- **使用合适的项目结构进行组织。** 按照[项目结构](/learn/zh/api-definitions/overview/project-structure)中的说明,清晰地组织包含您的定义和其他相关文件的目录。 +- **为端点添加 `operationId`。** 为每个端点包含清晰的 `operationId`,以控制在 SDK 中生成的函数名称。(或使用[扩展来自定义组和方法名称](/learn/zh/api-definitions/openapi/extensions/method-names)。) - **引用模式而不是内联。** 在 `components/schemas` 部分定义可重用的模式,并使用 `$ref` 引用它们。这促进了一致性,减少了重复,并使维护更容易。 ```yaml title="openapi.yml" {8, 14, 17-25} @@ -135,7 +135,7 @@ components: enum: [available, pending, sold] ``` -- **使用覆盖层和 Fern 扩展进行自定义。** 使用 Fern [扩展](/api-definitions/openapi/extensions/overview)来自定义您的规范,这些扩展保存在[覆盖层文件](/api-definitions/openapi/overlays)中。这使您能够修改生成行为,而不更改核心 OpenAPI 定义。 +- **使用覆盖层和 Fern 扩展进行自定义。** 使用 Fern [扩展](/learn/zh/api-definitions/openapi/extensions/overview)来自定义您的规范,这些扩展保存在[覆盖层文件](/learn/zh/api-definitions/openapi/overlays)中。这使您能够修改生成行为,而不更改核心 OpenAPI 定义。 一旦您的 OpenAPI 规范遵循这些实践,您就可以设置 fern 文件夹了。 diff --git a/fern/translations/zh/products/api-def/openapi/reference/generators-reference.mdx b/fern/translations/zh/products/api-def/openapi/reference/generators-reference.mdx index a69d2c11fa..b724f53f55 100644 --- a/fern/translations/zh/products/api-def/openapi/reference/generators-reference.mdx +++ b/fern/translations/zh/products/api-def/openapi/reference/generators-reference.mdx @@ -6,6 +6,6 @@ sidebar-title: OpenAPI generators.yml 参考 `generators.yml` 文件有两个作用:它在 `api.specs` 部分声明你的 OpenAPI 规范位置,并在可选的 `groups` 部分配置 SDK 生成。 -这里声明的 API 可以通过 `docs.yml` 在你的文档中渲染。请参阅[生成你的 API 参考文档](/learn/docs/api-references/generate-api-ref)。 +这里声明的 API 可以通过 `docs.yml` 在你的文档中渲染。请参阅[生成你的 API 参考文档](/learn/zh/docs/api-references/generate-api-ref)。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/openapi/server-frameworks/fastapi.mdx b/fern/translations/zh/products/api-def/openapi/server-frameworks/fastapi.mdx index 81e381eb48..58f2bfd1b8 100644 --- a/fern/translations/zh/products/api-def/openapi/server-frameworks/fastapi.mdx +++ b/fern/translations/zh/products/api-def/openapi/server-frameworks/fastapi.mdx @@ -71,7 +71,7 @@ async def your_post_endpoint( FastAPI 允许您为数据模型指定示例,Fern 将自动获取并在生成的 SDK 和文档中使用这些示例。 -有关在 Fern 中利用示例的更多信息,请参阅 [Fern 文档](/learn/api-definitions/openapi/extensions/request-response-examples)。 +有关在 Fern 中利用示例的更多信息,请参阅 [Fern 文档](/learn/zh/api-definitions/openapi/extensions/request-response-examples)。 有关此 FastAPI 功能的更多信息,请参阅 [FastAPI 文档](https://fastapi.tiangolo.com/tutorial/schema-extra-example/)。 diff --git a/fern/translations/zh/products/api-def/openapi/webhooks.mdx b/fern/translations/zh/products/api-def/openapi/webhooks.mdx index 2bd2d345d4..12b2d2e6f6 100644 --- a/fern/translations/zh/products/api-def/openapi/webhooks.mdx +++ b/fern/translations/zh/products/api-def/openapi/webhooks.mdx @@ -124,7 +124,7 @@ navigation: - subpackage_plants.newPlantWebhook # subpackage_{tag}.{webhook-event-name} ``` -有关如何在 `docs.yml` 中配置 webhook 参考的更多信息,请参阅[生成 webhook 参考](/docs/api-references/generate-webhook-ref)。 +有关如何在 `docs.yml` 中配置 webhook 参考的更多信息,请参阅[生成 webhook 参考](/learn/zh/docs/api-references/generate-webhook-ref)。 ## SDK 签名验证 diff --git a/fern/translations/zh/products/api-def/pages/asyncapi-empty.mdx b/fern/translations/zh/products/api-def/pages/asyncapi-empty.mdx index 4fd67a6684..14678f02df 100644 --- a/fern/translations/zh/products/api-def/pages/asyncapi-empty.mdx +++ b/fern/translations/zh/products/api-def/pages/asyncapi-empty.mdx @@ -5,4 +5,4 @@ sidebar-title: AsyncAPI 定义重定向页面 --- -此页面为空。请访问 [AsyncAPI 定义](/api-definitions/asyncapi/overview) 页面获取更多信息。 \ No newline at end of file +此页面为空。请访问 [AsyncAPI 定义](/learn/zh/api-definitions/asyncapi/overview) 页面获取更多信息。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/pages/ferndef-empty.mdx b/fern/translations/zh/products/api-def/pages/ferndef-empty.mdx index 1e43825603..fd06a6664a 100644 --- a/fern/translations/zh/products/api-def/pages/ferndef-empty.mdx +++ b/fern/translations/zh/products/api-def/pages/ferndef-empty.mdx @@ -5,4 +5,4 @@ sidebar-title: Fern 定义重定向页面 --- -此页面为空。请访问 [Fern 定义](/api-definitions/ferndef/overview) 页面获取更多信息。 \ No newline at end of file +此页面为空。请访问 [Fern 定义](/learn/zh/api-definitions/ferndef/overview) 页面获取更多信息。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/pages/grpc-empty.mdx b/fern/translations/zh/products/api-def/pages/grpc-empty.mdx index 0c8da60a77..f0d74ba9aa 100644 --- a/fern/translations/zh/products/api-def/pages/grpc-empty.mdx +++ b/fern/translations/zh/products/api-def/pages/grpc-empty.mdx @@ -5,4 +5,4 @@ sidebar-title: gRPC 定义重定向页面 --- -此页面为空。请访问 [gRPC 定义](/api-definitions/grpc/overview) 页面获取更多信息。 \ No newline at end of file +此页面为空。请访问 [gRPC 定义](/learn/zh/api-definitions/grpc/overview) 页面获取更多信息。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/pages/openapi-empty.mdx b/fern/translations/zh/products/api-def/pages/openapi-empty.mdx index 37aa061622..0bac0251cc 100644 --- a/fern/translations/zh/products/api-def/pages/openapi-empty.mdx +++ b/fern/translations/zh/products/api-def/pages/openapi-empty.mdx @@ -5,4 +5,4 @@ sidebar-title: OpenAPI 定义重定向页面 --- -此页面为空。请访问 [OpenAPI 定义](/api-definitions/openapi/overview) 页面获取更多信息。 \ No newline at end of file +此页面为空。请访问 [OpenAPI 定义](/learn/zh/api-definitions/openapi/overview) 页面获取更多信息。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/pages/openrpc-empty.mdx b/fern/translations/zh/products/api-def/pages/openrpc-empty.mdx index 24938a12c3..510a111fc9 100644 --- a/fern/translations/zh/products/api-def/pages/openrpc-empty.mdx +++ b/fern/translations/zh/products/api-def/pages/openrpc-empty.mdx @@ -5,4 +5,4 @@ sidebar-title: OpenRPC 定义重定向页面 --- -此页面为空。请访问 [OpenRPC 定义](/api-definitions/openrpc/overview) 页面获取更多信息。 \ No newline at end of file +此页面为空。请访问 [OpenRPC 定义](/learn/zh/api-definitions/openrpc/overview) 页面获取更多信息。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/pages/overrides.mdx b/fern/translations/zh/products/api-def/pages/overrides.mdx index 77ee9da680..b7515c693d 100644 --- a/fern/translations/zh/products/api-def/pages/overrides.mdx +++ b/fern/translations/zh/products/api-def/pages/overrides.mdx @@ -6,12 +6,12 @@ description: 使用单独的重写文件自定义您的 API 定义。 使用重写文件来自定义您的 OpenAPI、AsyncAPI 或 OpenRPC 定义,而无需修改原始规范。这在以下情况下很有用: * 您的 API 规范是从服务器代码自动生成的 -* 您需要为 SDK、文档或[生成的 CLI](/learn/cli-generator/get-started/customization#overrides-and-overlays) 使用不同的配置 +* 您需要为 SDK、文档或[生成的 CLI](/learn/zh/cli-generator/get-started/customization#overrides-and-overlays) 使用不同的配置 重写功能适用于 OpenAPI、AsyncAPI 和 OpenRPC 规范。 - 对于 OpenAPI 规范,Fern 推荐使用[覆盖层](/learn/api-definitions/openapi/overlays)而不是重写。覆盖层遵循官方的 [OpenAPI Overlay 规范](https://spec.openapis.org/overlay/v1.0.0.html),支持使用 JSONPath 通配符进行批量更改,并且在 OpenAPI 生态系统中是可移植的。 + 对于 OpenAPI 规范,Fern 推荐使用[覆盖层](/learn/zh/api-definitions/openapi/overlays)而不是重写。覆盖层遵循官方的 [OpenAPI Overlay 规范](https://spec.openapis.org/overlay/v1.0.0.html),支持使用 JSONPath 通配符进行批量更改,并且在 OpenAPI 生态系统中是可移植的。 重写功能也完全受支持。如果重写对您的团队有效,则无需切换。您也可以同时使用两者(先应用重写,然后应用覆盖层)。 @@ -21,7 +21,7 @@ description: 使用单独的重写文件自定义您的 API 定义。 -在包含您的 API 定义的文件夹中[创建 `overrides.yml` 文件](/cli-api-reference/cli-reference/commands#fern-write-overrides): +在包含您的 API 定义的文件夹中[创建 `overrides.yml` 文件](/learn/zh/cli-api-reference/cli-reference/commands#fern-write-overrides): ```bash {6} fern/ @@ -37,7 +37,7 @@ fern/ -对于 OpenAPI、AsyncAPI 和 OpenRPC,您可以使用 [Fern 的扩展](/learn/api-definitions/openapi/extensions/overview)来应用自定义。 +对于 OpenAPI、AsyncAPI 和 OpenRPC,您可以使用 [Fern 的扩展](/learn/zh/api-definitions/openapi/extensions/overview)来应用自定义。 ```yml title="overrides.yml" {4-5} paths: diff --git a/fern/translations/zh/products/api-def/pages/project-structure.mdx b/fern/translations/zh/products/api-def/pages/project-structure.mdx index fdbedb64ea..6a8970de27 100644 --- a/fern/translations/zh/products/api-def/pages/project-structure.mdx +++ b/fern/translations/zh/products/api-def/pages/project-structure.mdx @@ -6,7 +6,7 @@ description: 描述 Fern 文件夹结构 配置 fern 从 `fern` 文件夹开始,该文件夹包含您的 API 定义、SDK 生成器和 CLI 版本。 -Fern 推荐使用多仓库结构,将您的 fern 文件夹放在源代码仓库中(包含您的 API 定义和生成配置),并[将每个生成的 SDK 放在各自独立的仓库中](/sdks/overview/project-structure)。 +Fern 推荐使用多仓库结构,将您的 fern 文件夹放在源代码仓库中(包含您的 API 定义和生成配置),并[将每个生成的 SDK 放在各自独立的仓库中](/learn/zh/sdks/overview/project-structure)。 ## 目录结构 @@ -25,7 +25,7 @@ Fern 推荐使用多仓库结构,将您的 fern 文件夹放在源代码仓库 ## 核心配置文件 - 除了核心文件外,您还可以选择使用[覆盖层 (OpenAPI)](/learn/api-definitions/openapi/overlays) 或[重写](/learn/api-definitions/asyncapi/overrides)文件来自定义您的 API 定义,而无需修改原始规范。 + 除了核心文件外,您还可以选择使用[覆盖层 (OpenAPI)](/learn/zh/api-definitions/openapi/overlays) 或[重写](/learn/zh/api-definitions/asyncapi/overrides)文件来自定义您的 API 定义,而无需修改原始规范。 ### `fern.config.json` @@ -40,12 +40,12 @@ Fern 推荐使用多仓库结构,将您的 fern 文件夹放在源代码仓库 ``` - 使用本地安装的 CLI 时,将 `version` 设置为 `"*"`。有关详细信息,请参阅[本地安装 Fern CLI](/cli-api-reference/cli-reference/overview#install-fern-cli-locally)。 + 使用本地安装的 CLI 时,将 `version` 设置为 `"*"`。有关详细信息,请参阅[本地安装 Fern CLI](/learn/zh/cli-api-reference/cli-reference/overview#install-fern-cli-locally)。 ### `generators.yml` -`generators.yml` 文件声明您的 API 规范位置。这还启用了[API 参考文档](/learn/docs/api-references/overview)。 +`generators.yml` 文件声明您的 API 规范位置。这还启用了[API 参考文档](/learn/zh/docs/api-references/overview)。 ```yaml title="generators.yml" api: @@ -53,19 +53,19 @@ api: - openapi: ./openapi/openapi.yml ``` -对于 SDK 生成,需要 `generators.yml` 文件。添加 `groups` 部分来配置要生成哪些 SDK。有关详细信息,请参阅 [SDK 项目结构](/sdks/overview/project-structure#generatorsyml)。 +对于 SDK 生成,需要 `generators.yml` 文件。添加 `groups` 部分来配置要生成哪些 SDK。有关详细信息,请参阅 [SDK 项目结构](/learn/zh/sdks/overview/project-structure#generatorsyml)。 ### API 定义文件 -对于 [OpenAPI](/api-definitions/openapi/overview)、[AsyncAPI](/api-definitions/asyncapi/overview)、[OpenRPC](/api-definitions/openrpc/overview) 和 [gRPC](/api-definitions/grpc/overview),您将有一个自包含的规范文件。 +对于 [OpenAPI](/learn/zh/api-definitions/openapi/overview)、[AsyncAPI](/learn/zh/api-definitions/asyncapi/overview)、[OpenRPC](/learn/zh/api-definitions/openrpc/overview) 和 [gRPC](/learn/zh/api-definitions/grpc/overview),您将有一个自包含的规范文件。 ## 在何处存储您的 API 定义 管理 API 定义有三种常见方式: - **直接提交到您的 Fern 仓库(推荐)。** 将您的 API 定义文件检入包含 Fern 配置的同一仓库。如果您不在其他地方维护定义,这是最简单的方法。 -- **从源代码仓库同步。** 将您的 API 定义存储在与 API 源代码相同的仓库中,并将更新同步到您的 Fern 仓库。您可以使用 [`fern api update`](/cli-api-reference/cli-reference/commands#fern-api-update) CLI 命令或 [sync-openapi GitHub Action](/learn/api-definitions/openapi/sync-your-open-api-specification) 来自动化此过程。 -- **在公共 URL 托管。** 从可公开访问的端点提供定义,并在 `generators.yml` 中配置 [`origin`](/learn/sdks/reference/generators-yml#openapi) 字段,以便 Fern 可以获取它。当您希望有一个多个消费者可以引用的单一权威定义时,这很有用。 +- **从源代码仓库同步。** 将您的 API 定义存储在与 API 源代码相同的仓库中,并将更新同步到您的 Fern 仓库。您可以使用 [`fern api update`](/learn/zh/cli-api-reference/cli-reference/commands#fern-api-update) CLI 命令或 [sync-openapi GitHub Action](/learn/zh/api-definitions/openapi/sync-your-open-api-specification) 来自动化此过程。 +- **在公共 URL 托管。** 从可公开访问的端点提供定义,并在 `generators.yml` 中配置 [`origin`](/learn/zh/sdks/reference/generators-yml#openapi) 字段,以便 Fern 可以获取它。当您希望有一个多个消费者可以引用的单一权威定义时,这很有用。 ## 多个 API @@ -196,7 +196,7 @@ groups: -添加 [`namespace`](/learn/sdks/reference/generators-yml#namespace) 来处理 API 之间重叠的架构名称或组织不同的 API 版本: +添加 [`namespace`](/learn/zh/sdks/reference/generators-yml#namespace) 来处理 API 之间重叠的架构名称或组织不同的 API 版本: diff --git a/fern/translations/zh/products/api-def/pages/what-is-an-api-definition.mdx b/fern/translations/zh/products/api-def/pages/what-is-an-api-definition.mdx index 1d1240957d..c3b488ae4b 100644 --- a/fern/translations/zh/products/api-def/pages/what-is-an-api-definition.mdx +++ b/fern/translations/zh/products/api-def/pages/what-is-an-api-definition.mdx @@ -269,28 +269,28 @@ Fern 集成了多种 API 定义格式: 多种语言的客户端库,自动与你的 API 保持同步。 包含代码示例和实时测试功能的交互式 API 文档。 } - href="/docs/integrations/postman" + href="/learn/zh/docs/integrations/postman" > 预填充示例请求和响应的即用型集合。 } - href="/api-definitions/openapi/frameworks/fastapi" + href="/learn/zh/api-definitions/openapi/frameworks/fastapi" > 适用于 FastAPI 的 Pydantic 模型或 Spring Boot 应用程序的控制器。 diff --git a/fern/translations/zh/products/cli-api-reference/pages/cli-get-started.mdx b/fern/translations/zh/products/cli-api-reference/pages/cli-get-started.mdx index 2fe9f5ef7e..4e253b645c 100644 --- a/fern/translations/zh/products/cli-api-reference/pages/cli-get-started.mdx +++ b/fern/translations/zh/products/cli-api-reference/pages/cli-get-started.mdx @@ -58,7 +58,7 @@ npm install fern-api } ``` -有关更多详细信息,请参阅 [fern.config.json 参考](/learn/sdks/overview/project-structure#fernconfigjson)。 +有关更多详细信息,请参阅 [fern.config.json 参考](/learn/zh/sdks/overview/project-structure#fernconfigjson)。 @@ -76,13 +76,13 @@ npm fern generate ## 按产品分类的 CLI 工作流程 -Fern CLI 管理文档和 SDK 工作流程。以下是每个产品常用命令的简要概述。所有命令都支持[全局选项](/learn/cli-api-reference/cli-reference/options),如用于调试的 `--log-level`。 +Fern CLI 管理文档和 SDK 工作流程。以下是每个产品常用命令的简要概述。所有命令都支持[全局选项](/learn/zh/cli-api-reference/cli-reference/options),如用于调试的 `--log-level`。 -有关完整的 CLI 文档,请参阅[命令参考](/learn/cli-api-reference/cli-reference/commands)。 +有关完整的 CLI 文档,请参阅[命令参考](/learn/zh/cli-api-reference/cli-reference/commands)。 - 在使用 Fern Docs 时,您将使用这些 CLI 命令。有关完整说明,请参阅[文档快速入门](/learn/docs/getting-started/quickstart)。 + 在使用 Fern Docs 时,您将使用这些 CLI 命令。有关完整说明,请参阅[文档快速入门](/learn/zh/docs/getting-started/quickstart)。 | 命令 | 描述 | |---------|-------------| @@ -92,7 +92,7 @@ Fern CLI 管理文档和 SDK 工作流程。以下是每个产品常用命令的 - 在使用 Fern SDK 时,您将使用这些 CLI 命令。有关完整说明,请参阅[SDK 快速入门](/learn/sdks/overview/quickstart)。 + 在使用 Fern SDK 时,您将使用这些 CLI 命令。有关完整说明,请参阅[SDK 快速入门](/learn/zh/sdks/overview/quickstart)。 | 命令 | 描述 | |---------|-------------| diff --git a/fern/translations/zh/products/cli-api-reference/pages/commands.mdx b/fern/translations/zh/products/cli-api-reference/pages/commands.mdx index 7e5fec6e1b..a127bd0bc0 100644 --- a/fern/translations/zh/products/cli-api-reference/pages/commands.mdx +++ b/fern/translations/zh/products/cli-api-reference/pages/commands.mdx @@ -98,7 +98,7 @@ hideOnThisPage: true background: '#000000' ``` - 要发布 API 文档,运行 [`fern generate --docs`](/learn/cli-api/cli-reference/commands#fern-generate---docs)。 + 要发布 API 文档,运行 [`fern generate --docs`](/learn/zh/cli-api-reference/cli-reference/commands#fern-generate---docs)。 ### mintlify @@ -140,13 +140,13 @@ hideOnThisPage: true - 更多关于入门的信息,请查看我们的[快速入门指南](/learn/docs/getting-started/quickstart) + 更多关于入门的信息,请查看我们的[快速入门指南](/learn/zh/docs/getting-started/quickstart) - 使用 `fern export` 为你的 API 生成 OpenAPI 规范。当你用 OpenAPI 以外的格式(如 [Fern Definition](/learn/api-definitions/ferndef/overview))定义 API 并需要将其导出以集成其他工具或服务时,这很有用。 + 使用 `fern export` 为你的 API 生成 OpenAPI 规范。当你用 OpenAPI 以外的格式(如 [Fern Definition](/learn/zh/api-definitions/ferndef/overview))定义 API 并需要将其导出以集成其他工具或服务时,这很有用。 @@ -180,7 +180,7 @@ hideOnThisPage: true ### group - 使用 `--group ` 指定要运行哪个生成器组。你可以使用组名或别名。别名[在你的 `generators.yml` 中定义](/learn/sdks/reference/generators-yml#aliases),映射到多个组,允许你通过单个命令并行运行多个组。 + 使用 `--group ` 指定要运行哪个生成器组。你可以使用组名或别名。别名[在你的 `generators.yml` 中定义](/learn/zh/sdks/reference/generators-yml#aliases),映射到多个组,允许你通过单个命令并行运行多个组。 ```bash # 运行特定组 @@ -198,7 +198,7 @@ hideOnThisPage: true 你也可以在 `generators.yml` 中设置别名作为 `default-group`,这样不带任何参数运行 `fern generate` 会运行该别名中的所有组。 - `--group` 标志可以与其他标志组合使用,如用于[自托管 SDK 生成](/learn/sdks/deep-dives/self-hosted)的 `--local`、用于本地测试的 `--preview` 或用于指定 SDK 版本的 `--version`。 + `--group` 标志可以与其他标志组合使用,如用于[自托管 SDK 生成](/learn/zh/sdks/deep-dives/self-hosted)的 `--local`、用于本地测试的 `--preview` 或用于指定 SDK 版本的 `--version`。 ### preview @@ -246,7 +246,7 @@ hideOnThisPage: true ### local - 使用 `--local` 在你自己的机器上运行 SDK 生成,而不是使用 Fern 的云基础设施。这对于有严格安全或合规要求的组织很有用。设置说明请参阅[自托管 SDK](/learn/sdks/deep-dives/self-hosted)。 + 使用 `--local` 在你自己的机器上运行 SDK 生成,而不是使用 Fern 的云基础设施。这对于有严格安全或合规要求的组织很有用。设置说明请参阅[自托管 SDK](/learn/zh/sdks/deep-dives/self-hosted)。 ```bash # 本地生成所有 SDK @@ -260,7 +260,7 @@ hideOnThisPage: true 你的机器上必须运行 Docker 守护进程,因为 SDK 生成在 Docker 容器内运行。 - 默认情况下,CLI 从 Docker Hub 拉取生成器镜像。要从自定义容器注册表拉取,在 `generators.yml` 中使用 [`image` 字段](/learn/sdks/reference/generators-yml#image)而不是 `name`。详见[自定义容器注册表](/learn/sdks/deep-dives/self-hosted#optional-configure-a-custom-container-registry)。 + 默认情况下,CLI 从 Docker Hub 拉取生成器镜像。要从自定义容器注册表拉取,在 `generators.yml` 中使用 [`image` 字段](/learn/zh/sdks/reference/generators-yml#image)而不是 `name`。详见[自定义容器注册表](/learn/zh/sdks/deep-dives/self-hosted#optional-configure-a-custom-container-registry)。 ### force @@ -276,12 +276,12 @@ hideOnThisPage: true - `--broken-links` 和 `--strict-broken-links` 标志已弃用。请改用 `docs.yml` 中的 [`broken-links` 验证规则](/learn/docs/configuration/site-level-settings#check-configuration)。 + `--broken-links` 和 `--strict-broken-links` 标志已弃用。请改用 `docs.yml` 中的 [`broken-links` 验证规则](/learn/zh/docs/configuration/site-level-settings#check-configuration)。 - 使用 `fern check` 验证你的 API 定义和 Fern 配置,包括 [`fern.config.json`](/learn/sdks/overview/project-structure#fernconfigjson)、`generators.yml` 和 `docs.yml`。它检查失效链接、无效的 API 示例、配置错误等。当所有检查通过时,命令不产生输出。 + 使用 `fern check` 验证你的 API 定义和 Fern 配置,包括 [`fern.config.json`](/learn/zh/sdks/overview/project-structure#fernconfigjson)、`generators.yml` 和 `docs.yml`。它检查失效链接、无效的 API 示例、配置错误等。当所有检查通过时,命令不产生输出。 - 大多数 `fern check` 规则——包括 [`broken-links`](/learn/docs/configuration/site-level-settings#check-configuration)——根据从**本地**配置构建的导航树进行验证,不会爬取你的实时部署站点或跟踪外部 URL。例外是 [`missing-redirects` 规则](/learn/docs/seo/redirects#catching-missing-redirects),它将本地导航与先前发布的状态进行比较,因此需要 `fern login` 或 `FERN_TOKEN`。 + 大多数 `fern check` 规则——包括 [`broken-links`](/learn/zh/docs/configuration/site-level-settings#check-configuration)——根据从**本地**配置构建的导航树进行验证,不会爬取你的实时部署站点或跟踪外部 URL。例外是 [`missing-redirects` 规则](/learn/zh/docs/seo/redirects#catching-missing-redirects),它将本地导航与先前发布的状态进行比较,因此需要 `fern login` 或 `FERN_TOKEN`。 ```bash @@ -289,7 +289,7 @@ hideOnThisPage: true ``` - 你可以[使用 `check.rules` 属性](/learn/docs/configuration/site-level-settings#check-configuration)在 `docs.yml` 文件中配置 `fern check` 运行的验证规则的严重性。 + 你可以[使用 `check.rules` 属性](/learn/zh/docs/configuration/site-level-settings#check-configuration)在 `docs.yml` 文件中配置 `fern check` 运行的验证规则的严重性。 ```yaml docs.yml check: @@ -385,7 +385,7 @@ hideOnThisPage: true # -> https://your-org-preview-my-feature.docs.buildwithfern.com ``` - 这在 CI 工作流中很有用,你希望每个拉取请求有一个预览 URL。详见[预览更改](/learn/docs/preview-publish/preview-changes#preview-links)。 + 这在 CI 工作流中很有用,你希望每个拉取请求有一个预览 URL。详见[预览更改](/learn/zh/docs/preview-publish/preview-changes#preview-links)。 ### force @@ -593,7 +593,7 @@ hideOnThisPage: true - 使用 `fern upgrade` 将 [`fern.config.json`](/learn/sdks/overview/project-structure#fernconfigjson) 中的编译器版本升级到最新版本。它还会将 `generators.yml` 中的生成器升级到其最低兼容版本。 + 使用 `fern upgrade` 将 [`fern.config.json`](/learn/zh/sdks/overview/project-structure#fernconfigjson) 中的编译器版本升级到最新版本。它还会将 `generators.yml` 中的生成器升级到其最低兼容版本。 ```bash @@ -634,7 +634,7 @@ hideOnThisPage: true ``` - 要启用 CI/CD,使用 [`fern token`](/learn/cli-api/cli-reference/commands#fern-token)。 + 要启用 CI/CD,使用 [`fern token`](/learn/zh/cli-api-reference/cli-reference/commands#fern-token)。 @@ -657,7 +657,7 @@ hideOnThisPage: true - 请参阅[发布你的文档](/learn/docs/preview-publish/publishing-your-docs#usage-in-github-actions)了解在自动化发布工作流中使用此令牌的说明。 + 请参阅[发布你的文档](/learn/zh/docs/preview-publish/publishing-your-docs#usage-in-github-actions)了解在自动化发布工作流中使用此令牌的说明。 @@ -774,7 +774,7 @@ hideOnThisPage: true - 从 `generators.yml` 中指定的 `origin` 拉取最新的 OpenAPI 规范并更新本地规范。或者,你可以[通过设置 GitHub Action 来自动化此过程](/api-definitions/openapi/sync-your-open-api-specification)。 + 从 `generators.yml` 中指定的 `origin` 拉取最新的 OpenAPI 规范并更新本地规范。或者,你可以[通过设置 GitHub Action 来自动化此过程](/learn/zh/api-definitions/openapi/sync-your-open-api-specification)。 ```bash @@ -795,7 +795,7 @@ hideOnThisPage: true - 使用 `fern api enrich` 将 [AI 生成的示例](/learn/docs/ai-features/ai-examples)或手动编写的 [`x-fern-examples`](/learn/api-definitions/openapi/extensions/request-response-examples) 转换为任何 OpenAPI 兼容工具都可以使用的可移植 OpenAPI 示例。 + 使用 `fern api enrich` 将 [AI 生成的示例](/learn/zh/docs/ai-features/ai-examples)或手动编写的 [`x-fern-examples`](/learn/zh/api-definitions/openapi/extensions/request-response-examples) 转换为任何 OpenAPI 兼容工具都可以使用的可移植 OpenAPI 示例。 ```bash @@ -830,7 +830,7 @@ hideOnThisPage: true - 使用 `fern docs theme export` 从你的 `docs.yml` 中提取[符合主题条件的字段](/learn/docs/customization/global-themes)到独立目录。导出的 `theme.yml` 及其资源然后可以用 `fern docs theme upload` 上传。 + 使用 `fern docs theme export` 从你的 `docs.yml` 中提取[符合主题条件的字段](/learn/zh/docs/customization/global-themes)到独立目录。导出的 `theme.yml` 及其资源然后可以用 `fern docs theme upload` 上传。 ```bash @@ -852,7 +852,7 @@ hideOnThisPage: true - 使用 `fern docs theme upload` 将[主题](/learn/docs/customization/global-themes)上传到 Fern 的注册表。该命令从 `./fern/theme/` 读取 `theme.yml` 并将其与任何引用的文件资源一起上传。 + 使用 `fern docs theme upload` 将[主题](/learn/zh/docs/customization/global-themes)上传到 Fern 的注册表。该命令从 `./fern/theme/` 读取 `theme.yml` 并将其与任何引用的文件资源一起上传。 ```bash @@ -880,7 +880,7 @@ hideOnThisPage: true - 使用 `fern docs theme list` 列出为你组织上传的所有[主题](/learn/docs/customization/global-themes)。 + 使用 `fern docs theme list` 列出为你组织上传的所有[主题](/learn/zh/docs/customization/global-themes)。 ```bash diff --git a/fern/translations/zh/products/cli-generator/configuration.mdx b/fern/translations/zh/products/cli-generator/configuration.mdx index a9997d082b..467f01dece 100644 --- a/fern/translations/zh/products/cli-generator/configuration.mdx +++ b/fern/translations/zh/products/cli-generator/configuration.mdx @@ -8,7 +8,7 @@ availability: beta CLI 生成器处于抢先体验阶段。[联系我们](https://buildwithfern.com/book-demo?type=cli)开始使用。 -在 `generators.yml` 中配置 CLI 生成器。嵌套在 `config` 下的选项是 CLI 生成器特有的。其余选项(`output`、`github`、`audiences`、`smart-casing`、`metadata`、`api`)与 [SDK 生成器](/learn/sdks/reference/generators-yml)的行为相同。 +在 `generators.yml` 中配置 CLI 生成器。嵌套在 `config` 下的选项是 CLI 生成器特有的。其余选项(`output`、`github`、`audiences`、`smart-casing`、`metadata`、`api`)与 [SDK 生成器](/learn/zh/sdks/reference/generators-yml)的行为相同。 ```yaml title="generators.yml" {6-8} groups: @@ -27,7 +27,7 @@ groups: ## `config` 选项 -编译后的二进制文件名称。决定可执行文件名、Cargo `[[bin]]` 目标名称,以及用于 [TLS、代理和日志设置](/learn/cli-generator/get-started/features#tls-proxies-and-ca-bundles)的环境变量前缀。 +编译后的二进制文件名称。决定可执行文件名、Cargo `[[bin]]` 目标名称,以及用于 [TLS、代理和日志设置](/learn/zh/cli-generator/get-started/features#tls-proxies-and-ca-bundles)的环境变量前缀。 未设置时,生成器从 API 定义的显示名称派生名称(kebab-case 格式)。多规范工作区必须显式设置此字段——当存在多个规范时,无法进行合理的自动派生。 @@ -60,7 +60,7 @@ config: ### `output` -配置生成的 CLI 的发布位置。CLI 生成器支持 `npm` 和 `local-file-system` 输出位置。完整的发布工作流(OIDC 认证、CI 构建、Homebrew tap)请参见[发布](/learn/cli-generator/get-started/publishing)。基于 Docker 的本地生成请参见[自托管生成](/learn/cli-generator/get-started/local-generation)。 +配置生成的 CLI 的发布位置。CLI 生成器支持 `npm` 和 `local-file-system` 输出位置。完整的发布工作流(OIDC 认证、CI 构建、Homebrew tap)请参见[发布](/learn/zh/cli-generator/get-started/publishing)。基于 Docker 的本地生成请参见[自托管生成](/learn/zh/cli-generator/get-started/local-generation)。 @@ -102,7 +102,7 @@ groups: ### `github` -指定生成的 CLI 代码如何交付到您的仓库。支持与 SDK 相同的[模式](/learn/sdks/reference/generators-yml#github):`release`、`pull-request` 和 `push`。 +指定生成的 CLI 代码如何交付到您的仓库。支持与 SDK 相同的[模式](/learn/zh/sdks/reference/generators-yml#github):`release`、`pull-request` 和 `push`。 ```yaml title="generators.yml" groups: @@ -127,7 +127,7 @@ groups: ### `audiences` -根据受众标签过滤生成的 CLI 中包含哪些 API 端点。只有在 API 规范中通过 [`x-fern-audiences`](/learn/api-definitions/openapi/extensions/audiences) 标记了指定受众的端点才会生成命令。不设置此过滤器时,所有端点都会生成命令。 +根据受众标签过滤生成的 CLI 中包含哪些 API 端点。只有在 API 规范中通过 [`x-fern-audiences`](/learn/zh/api-definitions/openapi/extensions/audiences) 标记了指定受众的端点才会生成命令。不设置此过滤器时,所有端点都会生成命令。 ```yaml title="generators.yml" groups: @@ -157,7 +157,7 @@ groups: ### `api` -在生成器级别覆盖身份验证设置。使用与 [SDK 生成器级别 `api.auth`](/learn/sdks/reference/generators-yml#override-api-authentication-settings) 相同的 schema 来控制 CLI 使用的认证方案。 +在生成器级别覆盖身份验证设置。使用与 [SDK 生成器级别 `api.auth`](/learn/zh/sdks/reference/generators-yml#override-api-authentication-settings) 相同的 schema 来控制 CLI 使用的认证方案。 ```yaml title="generators.yml" groups: diff --git a/fern/translations/zh/products/cli-generator/customization.mdx b/fern/translations/zh/products/cli-generator/customization.mdx index f655c1ca0f..0b3acd4c32 100644 --- a/fern/translations/zh/products/cli-generator/customization.mdx +++ b/fern/translations/zh/products/cli-generator/customization.mdx @@ -12,7 +12,7 @@ CLI 生成器处于抢先体验阶段。[联系我们](https://buildwithfern.com ## 覆盖和 Overlays -CLI 生成器支持 [overrides](/learn/api-definitions/openapi/overrides) 和 [overlays](/learn/api-definitions/openapi/overlays) 两种方式来在构建 CLI 前自定义 OpenAPI 规范。这允许您添加 Fern 扩展、重命名参数或移除内部端点,而无需修改原始规范。 +CLI 生成器支持 [overrides](/learn/zh/api-definitions/openapi/overrides) 和 [overlays](/learn/zh/api-definitions/openapi/overlays) 两种方式来在构建 CLI 前自定义 OpenAPI 规范。这允许您添加 Fern 扩展、重命名参数或移除内部端点,而无需修改原始规范。 Overlays 遵循 [OpenAPI Overlay 规范](https://spec.openapis.org/overlay/v1.0.0.html)并使用 JSONPath 来定位元素: diff --git a/fern/translations/zh/products/cli-generator/features.mdx b/fern/translations/zh/products/cli-generator/features.mdx index 4cf6513acc..f9d1f545a3 100644 --- a/fern/translations/zh/products/cli-generator/features.mdx +++ b/fern/translations/zh/products/cli-generator/features.mdx @@ -39,7 +39,7 @@ contoso plants get --params '{"plantId": "abc"}' --dry-run ## 分页 -对于标注了 [`x-fern-pagination`](/learn/api-definitions/openapi/extensions/pagination) 的端点,CLI 在设置 `--page-all` 标志时自动分页。 +对于标注了 [`x-fern-pagination`](/learn/zh/api-definitions/openapi/extensions/pagination) 的端点,CLI 在设置 `--page-all` 标志时自动分页。 | 标志 | 描述 | 默认值 | | --- | --- | --- | @@ -75,7 +75,7 @@ contoso plants create \ ## 服务器 URL 变量 -对于具有[模板化服务器 URL](/learn/api-definitions/openapi/extensions/server-names-and-url-templating)(如 `https://api.example.com/stores/{store_hash}/v3`)的 API,CLI 自动将每个模板变量暴露为 CLI 标志和环境变量。 +对于具有[模板化服务器 URL](/learn/zh/api-definitions/openapi/extensions/server-names-and-url-templating)(如 `https://api.example.com/stores/{store_hash}/v3`)的 API,CLI 自动将每个模板变量暴露为 CLI 标志和环境变量。 ```bash # 以标志形式传递变量 diff --git a/fern/translations/zh/products/cli-generator/local-generation.mdx b/fern/translations/zh/products/cli-generator/local-generation.mdx index f60000cfdc..8df0ccd44f 100644 --- a/fern/translations/zh/products/cli-generator/local-generation.mdx +++ b/fern/translations/zh/products/cli-generator/local-generation.mdx @@ -8,7 +8,7 @@ availability: beta CLI 生成器处于抢先体验阶段。[联系我们](https://buildwithfern.com/book-demo?type=cli)开始使用。 -默认情况下,`fern generate` [在 Fern 的云基础设施上运行 CLI 生成器](/learn/cli-generator/get-started/quickstart)。传入 `--local` 可改为在本地机器上运行生成。API 定义数据不会离开您的机器:唯一的网络调用是组织验证和拉取 Docker 镜像(如果未缓存)。这适合有严格安全或合规要求、需要将规范保留在 Fern 基础设施之外的组织。 +默认情况下,`fern generate` [在 Fern 的云基础设施上运行 CLI 生成器](/learn/zh/cli-generator/get-started/quickstart)。传入 `--local` 可改为在本地机器上运行生成。API 定义数据不会离开您的机器:唯一的网络调用是组织验证和拉取 Docker 镜像(如果未缓存)。这适合有严格安全或合规要求、需要将规范保留在 Fern 基础设施之外的组织。 ## 云生成与本地生成的比较 @@ -25,19 +25,19 @@ CLI 生成器处于抢先体验阶段。[联系我们](https://buildwithfern.com - [Fern CLI](https://www.npmjs.com/package/fern-api) v5.37.9 或更高版本(`npm install -g fern-api`) - [Docker](https://docs.docker.com/get-docker/) 在您的机器上运行 - [Rust 工具链](https://rustup.rs/)(stable)用于构建生成的输出 -- 用于组织验证的 `FERN_TOKEN`(通过 `fern token` 生成或从 [Dashboard](/learn/dashboard/configuration/api-keys) 获取) +- 用于组织验证的 `FERN_TOKEN`(通过 `fern token` 生成或从 [Dashboard](/learn/zh/dashboard/configuration/api-keys) 获取) ## 设置 -本页假设您已完成[快速开始](/learn/cli-generator/get-started/quickstart),因此您的 `generators.yml` 已写入 [`local-file-system`](/learn/cli-generator/get-started/configuration#output) 输出路径。添加 `--local` 会通过 Docker 而非 Fern 的云运行相同的配置。 +本页假设您已完成[快速开始](/learn/zh/cli-generator/get-started/quickstart),因此您的 `generators.yml` 已写入 [`local-file-system`](/learn/zh/cli-generator/get-started/configuration#output) 输出路径。添加 `--local` 会通过 Docker 而非 Fern 的云运行相同的配置。 -自托管生成仍需要网络调用来验证您的组织。通过 `fern token` 或从 [Fern Dashboard](/learn/dashboard/configuration/api-keys) 生成令牌,然后导出: +自托管生成仍需要网络调用来验证您的组织。通过 `fern token` 或从 [Fern Dashboard](/learn/zh/dashboard/configuration/api-keys) 生成令牌,然后导出: ```bash export FERN_TOKEN= @@ -69,7 +69,7 @@ cargo build ## 自定义容器注册表 -默认情况下,`--local` 从 Docker Hub 拉取生成器镜像。要从私有注册表拉取,将 `name` 字段替换为 [`image`](/learn/sdks/reference/generators-yml#image) 对象: +默认情况下,`--local` 从 Docker Hub 拉取生成器镜像。要从私有注册表拉取,将 `name` 字段替换为 [`image`](/learn/zh/sdks/reference/generators-yml#image) 对象: ```yaml title="generators.yml" {4-6} groups: diff --git a/fern/translations/zh/products/cli-generator/openapi-extensions.mdx b/fern/translations/zh/products/cli-generator/openapi-extensions.mdx index c6377b689c..f22bf9f7ad 100644 --- a/fern/translations/zh/products/cli-generator/openapi-extensions.mdx +++ b/fern/translations/zh/products/cli-generator/openapi-extensions.mdx @@ -8,7 +8,7 @@ availability: beta CLI 生成器处于抢先体验阶段。[联系我们](https://buildwithfern.com/book-demo?type=cli)开始使用。 -CLI 生成器读取多个 [Fern OpenAPI 扩展](/learn/api-definitions/openapi/extensions/overview)来塑造生成的 CLI。您可以直接在规范中添加这些扩展,也可以通过 [overlays](/learn/api-definitions/openapi/overlays) 应用。 +CLI 生成器读取多个 [Fern OpenAPI 扩展](/learn/zh/api-definitions/openapi/extensions/overview)来塑造生成的 CLI。您可以直接在规范中添加这些扩展,也可以通过 [overlays](/learn/zh/api-definitions/openapi/overlays) 应用。 ## 命令结构 @@ -45,7 +45,7 @@ paths: 如果两个扩展都未设置,CLI 回退到 `operationId`。 -参见 [SDK 方法名称](/learn/api-definitions/openapi/extensions/method-names)了解更多详情。 +参见 [SDK 方法名称](/learn/zh/api-definitions/openapi/extensions/method-names)了解更多详情。 ## 过滤 @@ -74,7 +74,7 @@ paths: type: string ``` -参见[忽略元素](/learn/api-definitions/openapi/extensions/ignoring-elements)了解更多详情。 +参见[忽略元素](/learn/zh/api-definitions/openapi/extensions/ignoring-elements)了解更多详情。 ## 可用性徽章 @@ -100,7 +100,7 @@ paths: OpenAPI 的标准 `deprecated: true` 也会被识别,在未设置 `x-fern-availability` 时映射为 `[Deprecated]`。 -参见[可用性](/learn/api-definitions/openapi/extensions/availability)了解更多详情。 +参见[可用性](/learn/zh/api-definitions/openapi/extensions/availability)了解更多详情。 ## 参数命名 @@ -122,7 +122,7 @@ paths: 生成 `--api-version` 而非 `--x-api-version`。 -参见[自定义参数名称](/learn/api-definitions/openapi/extensions/parameter-names)了解更多详情。 +参见[自定义参数名称](/learn/zh/api-definitions/openapi/extensions/parameter-names)了解更多详情。 ## 分页 @@ -141,4 +141,4 @@ paths: results: $response.results ``` -参见[分页](/learn/api-definitions/openapi/extensions/pagination)了解所有支持的分页方案(offset、cursor、URI 和 path)。 +参见[分页](/learn/zh/api-definitions/openapi/extensions/pagination)了解所有支持的分页方案(offset、cursor、URI 和 path)。 diff --git a/fern/translations/zh/products/cli-generator/publishing.mdx b/fern/translations/zh/products/cli-generator/publishing.mdx index 6ea6789a54..b0908899db 100644 --- a/fern/translations/zh/products/cli-generator/publishing.mdx +++ b/fern/translations/zh/products/cli-generator/publishing.mdx @@ -8,12 +8,12 @@ availability: beta CLI 生成器处于抢先体验阶段。[联系我们](https://buildwithfern.com/book-demo?type=cli)开始使用。 -将生成的 CLI 发布到 npm、Homebrew 和 GitHub Releases。完成本页步骤后,每次标记发布都会自动构建跨平台二进制文件并发布。如需在自有基础设施上进行生成,可以[自托管生成器](/learn/cli-generator/get-started/local-generation),而非使用 Fern 的云服务。 +将生成的 CLI 发布到 npm、Homebrew 和 GitHub Releases。完成本页步骤后,每次标记发布都会自动构建跨平台二进制文件并发布。如需在自有基础设施上进行生成,可以[自托管生成器](/learn/zh/cli-generator/get-started/local-generation),而非使用 Fern 的云服务。 本页假设您已具备: -* 一个已初始化的 `fern` 文件夹,其中 `generators.yml` 已配置 CLI 生成器。参见[快速开始](/learn/cli-generator/get-started/quickstart)。 +* 一个已初始化的 `fern` 文件夹,其中 `generators.yml` 已配置 CLI 生成器。参见[快速开始](/learn/zh/cli-generator/get-started/quickstart)。 * 一个已有的 GitHub 仓库用于存放生成的 CLI 源码,并已安装 [Fern GitHub App](https://github.com/apps/fern-api)。 diff --git a/fern/translations/zh/products/cli-generator/quickstart.mdx b/fern/translations/zh/products/cli-generator/quickstart.mdx index 7e0b722ef4..f74e7ecac3 100644 --- a/fern/translations/zh/products/cli-generator/quickstart.mdx +++ b/fern/translations/zh/products/cli-generator/quickstart.mdx @@ -8,7 +8,7 @@ availability: beta CLI 生成器处于抢先体验阶段。[联系我们](https://buildwithfern.com/book-demo?type=cli)开始使用。 -本指南介绍从 OpenAPI 规范生成 CLI 并在本地运行。完成后,您将拥有一个编译好的二进制文件,它[将每个 API 端点映射为子命令](/learn/cli-generator/get-started/openapi-extensions#command-structure),并从规范中配置好[身份验证](/learn/cli-generator/get-started/authentication)、[输出格式化](/learn/cli-generator/get-started/features#output-formatting)和[分页](/learn/cli-generator/get-started/features#pagination)。 +本指南介绍从 OpenAPI 规范生成 CLI 并在本地运行。完成后,您将拥有一个编译好的二进制文件,它[将每个 API 端点映射为子命令](/learn/zh/cli-generator/get-started/openapi-extensions#command-structure),并从规范中配置好[身份验证](/learn/zh/cli-generator/get-started/authentication)、[输出格式化](/learn/zh/cli-generator/get-started/features#output-formatting)和[分页](/learn/zh/cli-generator/get-started/features#pagination)。 ## 前提条件 @@ -32,7 +32,7 @@ fern init --organization my-org -将规范放在 `fern/openapi.yml`(或在下一步中引用的任何路径)。规范必须包含至少一个路径,`components` 下声明的任何 `securitySchemes` 将成为 CLI [在运行时读取的凭据](/learn/cli-generator/get-started/authentication)。 +将规范放在 `fern/openapi.yml`(或在下一步中引用的任何路径)。规范必须包含至少一个路径,`components` 下声明的任何 `securitySchemes` 将成为 CLI [在运行时读取的凭据](/learn/zh/cli-generator/get-started/authentication)。 @@ -79,9 +79,9 @@ cargo build -- 通过在 `generators.yml` 上叠加 [overrides 和 overlays](/learn/cli-generator/get-started/customization#overrides-and-overlays) 来重命名命令、隐藏端点或修补元数据,无需分叉规范。 -- 通过在 `api.specs` 下列出多个规范,使用[多规范合并](/learn/cli-generator/get-started/customization#multi-spec-merging)发布一个驱动多个 API 的二进制文件。 -- 使用[自定义命令](/learn/cli-generator/get-started/customization#custom-commands)添加不映射到端点的子命令 — 登录流程、配置助手、本地工具。 +- 通过在 `generators.yml` 上叠加 [overrides 和 overlays](/learn/zh/cli-generator/get-started/customization#overrides-and-overlays) 来重命名命令、隐藏端点或修补元数据,无需分叉规范。 +- 通过在 `api.specs` 下列出多个规范,使用[多规范合并](/learn/zh/cli-generator/get-started/customization#multi-spec-merging)发布一个驱动多个 API 的二进制文件。 +- 使用[自定义命令](/learn/zh/cli-generator/get-started/customization#custom-commands)添加不映射到端点的子命令 — 登录流程、配置助手、本地工具。 diff --git a/fern/translations/zh/products/dashboard/pages/api-keys.mdx b/fern/translations/zh/products/dashboard/pages/api-keys.mdx index a6afaafca0..9dfe3101fd 100644 --- a/fern/translations/zh/products/dashboard/pages/api-keys.mdx +++ b/fern/translations/zh/products/dashboard/pages/api-keys.mdx @@ -3,7 +3,7 @@ title: API 密钥 description: 在 CI/CD 环境中创建和管理用于 CLI 身份验证的 API 密钥。 --- -[管理员](/learn/dashboard/configuration/permissions)可以在 [Fern Dashboard](https://dashboard.buildwithfern.com/fern/tokens) 中创建和管理 API 密钥。API 密钥用于在 CI/CD 流水线中验证 Fern CLI 身份,例如从 GitHub Actions 发布 SDK 或文档时。 +[管理员](/learn/zh/dashboard/configuration/permissions)可以在 [Fern Dashboard](https://dashboard.buildwithfern.com/fern/tokens) 中创建和管理 API 密钥。API 密钥用于在 CI/CD 流水线中验证 Fern CLI 身份,例如从 GitHub Actions 发布 SDK 或文档时。
` 组件在 API 参考页面底部(响应部分下方)添加内容。` ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2025-12-10.mdx b/fern/translations/zh/products/docs/pages/changelog/2025-12-10.mdx index cb28484078..a5dabc1812 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2025-12-10.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2025-12-10.mdx @@ -16,4 +16,4 @@ tags: ["components", "api-reference"] ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2025-12-11.mdx b/fern/translations/zh/products/docs/pages/changelog/2025-12-11.mdx index b83fd0a1db..6e676715ff 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2025-12-11.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2025-12-11.mdx @@ -13,7 +13,7 @@ logo: right-text: Docs ``` - + ## 画布主体主题 @@ -26,4 +26,4 @@ theme: 画布主题适用于所有页面布局,包括指南、概览和 API 参考文档页面。它使用您配置的 `card-background` 颜色和 `border` 颜色,与您站点的配色方案保持一致的样式。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2025-12-14.mdx b/fern/translations/zh/products/docs/pages/changelog/2025-12-14.mdx index fec41d0ceb..e993105821 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2025-12-14.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2025-12-14.mdx @@ -8,4 +8,4 @@ Fern 使用 AI 自动为您的 API 参考文档生成真实的请求和响应示 这些示例与您的规范保持同步 - 当您更改或添加字段时,生成的示例会自动更新。您可以自定义生成示例的样式,直接编辑它们,或者完全禁用此功能。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2025-12-15.mdx b/fern/translations/zh/products/docs/pages/changelog/2025-12-15.mdx index e6fd3e0336..8cdb62e46e 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2025-12-15.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2025-12-15.mdx @@ -19,4 +19,4 @@ page-actions: 自定义操作支持 `{slug}`、`{domain}` 和 `{url}` 等 URL 占位符,可以动态地将页面信息插入到链接中。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2025-12-16.mdx b/fern/translations/zh/products/docs/pages/changelog/2025-12-16.mdx index 43431a18aa..eb8ce869c4 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2025-12-16.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2025-12-16.mdx @@ -8,4 +8,4 @@ tags: ["customization"] 一旦启用,嵌入模式会在同一会话的导航事件中保持启用状态。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2025-12-20.mdx b/fern/translations/zh/products/docs/pages/changelog/2025-12-20.mdx index da82bf8e44..526f2aca8c 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2025-12-20.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2025-12-20.mdx @@ -17,4 +17,4 @@ Card 和 Icon 组件支持 SVG 文件的相对路径。使用像 `./images/icon. 自定义 SVG 图标 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-01-05.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-01-05.mdx index c891df2813..62a90fd061 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-01-05.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-01-05.mdx @@ -12,12 +12,12 @@ tags: ["components", "api-reference", "docs.yml"] 这对于在页面上嵌入多个端点或减少视觉混乱同时保持交互式 API 测试功能很有用。 - + ## 默认启用动态 SDK 代码片段 动态 SDK 代码片段现在默认启用。当您配置 SDK 代码片段时,用户可以修改参数并实时查看所有支持语言的代码示例更新。 -如果您更喜欢静态代码示例,可以在 `docs.yml` 中[禁用动态代码片段](/learn/docs/configuration/site-level-settings#experimentaldynamic-snippets)。 +如果您更喜欢静态代码示例,可以在 `docs.yml` 中[禁用动态代码片段](/learn/zh/docs/configuration/site-level-settings#experimentaldynamic-snippets)。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-01-09.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-01-09.mdx index 20e955be91..3f5f19bf7f 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-01-09.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-01-09.mdx @@ -19,4 +19,4 @@ tags: ["components"] 这对于显示特定版本的文档、安装说明或 API 示例非常有用,无需复制页面。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-01-15.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-01-15.mdx index 6092025437..27043bf8e6 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-01-15.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-01-15.mdx @@ -15,4 +15,4 @@ tags: ["components", "api-reference"] 当未指定 `languages` 时,将显示所有可用语言,`payload` 显示在最后。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-01-17.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-01-17.mdx index 23dbded5d0..e4b36691cc 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-01-17.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-01-17.mdx @@ -22,4 +22,4 @@ tags: ["components", "navigation"] 您还可以使用 `not` 属性来反转条件,当当前产品或版本不匹配时显示内容。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-01-22.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-01-22.mdx index b6c08e6aec..97d9e27bca 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-01-22.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-01-22.mdx @@ -11,4 +11,4 @@ def get_plant(plant_id): return plants.get(plant_id) ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-01-30.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-01-30.mdx index 14025c5c81..7b4cb633f8 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-01-30.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-01-30.mdx @@ -34,7 +34,7 @@ tags: ["components", "configuration", "docs.yml"] ``` - + ## 切换器位置配置 @@ -45,7 +45,7 @@ layout: switcher-placement: sidebar ``` - + ## 代码块中的智能续行 @@ -60,4 +60,4 @@ fern check fern docs dev ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-03.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-03.mdx index 352dcbf300..bd823ff580 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-03.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-03.mdx @@ -6,7 +6,7 @@ tags: ["components", "configuration", "navigation", "docs.yml"] `` 组件现在包含一个试用按钮,允许用户访问端点浏览器并直接从代码片段测试 API 端点。 - + ## 前置元数据可用性 @@ -21,7 +21,7 @@ availability: beta 有效值为:`stable`、`generally-available`、`in-development`、`pre-release`、`deprecated` 或 `beta`。 - + ## 使用索引文件的文件夹节概述 @@ -40,4 +40,4 @@ availability: beta - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-04.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-04.mdx index 778bcbb747..2c60b71b5d 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-04.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-04.mdx @@ -12,7 +12,7 @@ import { CustomCard } from "@/components/CustomCard" 仍然支持相对导入。 - + ## 文件夹导航的标题源 @@ -27,4 +27,4 @@ navigation: 没有前置元数据 `title` 的文件会回退到从文件名派生的值。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-05.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-05.mdx index 8d9a6ab94b..cd244b9ca3 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-05.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-05.mdx @@ -13,4 +13,4 @@ footer: ./components/CustomFooter.tsx 组件是服务器端渲染的,具有更好的 SEO 和性能,在页面加载过程中没有布局偏移。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-06.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-06.mdx index e98cbd3b0f..453b8e34c7 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-06.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-06.mdx @@ -6,7 +6,7 @@ tags: ["ai", "search", "navigation", "configuration", "docs.yml"] 使用查询参数直接从 URL 打开 Ask Fern 或搜索对话框。添加 `?searchType=ai&query={prompt}` 以使用提示打开 Ask AI,或使用 `?query={search}` 进行常规搜索。搜索打开后,参数将从 URL 中移除。 - + ## 全局文件夹标题来源设置 @@ -22,4 +22,4 @@ navigation: title-source: filename # 覆盖全局设置 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-09.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-09.mdx index 02d0295aeb..d2d5e0cbce 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-09.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-09.mdx @@ -12,4 +12,4 @@ api: - graphql: schema.graphql ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-10.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-10.mdx index a5521c446a..4dc9ff24b6 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-10.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-10.mdx @@ -13,4 +13,4 @@ navigation: - operation: MUTATION createPlant ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-11.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-11.mdx index 158f4fbf7a..4002fba7c6 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-11.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-11.mdx @@ -1,11 +1,11 @@ ## 自托管文档的 API 密钥注入 -自托管部署通过环境变量支持 [API 密钥注入](/learn/docs/authentication/features/api-key-injection)。启用 `FERN_API_KEY_INJECTION_ENABLED` 在 API Explorer 中显示 **登录** 按钮,而无需对整个站点要求登录。使用 `FERN_AUTH_ALLOWLIST` 和 `FERN_AUTH_DENYLIST` 控制页面级别的访问。 +自托管部署通过环境变量支持 [API 密钥注入](/learn/zh/docs/authentication/features/api-key-injection)。启用 `FERN_API_KEY_INJECTION_ENABLED` 在 API Explorer 中显示 **登录** 按钮,而无需对整个站点要求登录。使用 `FERN_AUTH_ALLOWLIST` 和 `FERN_AUTH_DENYLIST` 控制页面级别的访问。 - + ## 多个 API 密钥和每环境密钥 -API 密钥注入支持 [多个 API 密钥](/learn/docs/authentication/setup/jwt#build-the-fern-claim) 和 [每环境凭据](/learn/docs/authentication/setup/jwt#build-the-fern-claim)。在 `bearer_token` 中提供多个密钥作为 JSON 编码的数组,并使用 `env_state` 通过子字符串匹配为每个环境设置不同的凭据。 +API 密钥注入支持 [多个 API 密钥](/learn/zh/docs/authentication/setup/jwt#build-the-fern-claim) 和 [每环境凭据](/learn/zh/docs/authentication/setup/jwt#build-the-fern-claim)。在 `bearer_token` 中提供多个密钥作为 JSON 编码的数组,并使用 `env_state` 通过子字符串匹配为每个环境设置不同的凭据。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-12.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-12.mdx index e1d0214af6..64ec152193 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-12.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-12.mdx @@ -2,4 +2,4 @@ JWT 回调端点(`/api/fern-docs/auth/jwt/callback`)现在除了接受带查询参数的 `GET` 请求外,还接受带 `application/x-www-form-urlencoded` 主体的 `POST` 请求。POST 避免在 URL 和服务器日志中暴露 JWT 令牌。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-17.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-17.mdx index 23d7828eb5..f36b40ef8c 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-17.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-17.mdx @@ -6,4 +6,4 @@ tags: ["components"] 当使用 `` 与 markdown 标题语法时,步骤条目现在在目录中以匹配其标题级别的深度显示——`##` 标题在深度 2,`###` 标题在深度 3。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-23.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-23.mdx index 8db2bb2106..9116d1de90 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-23.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-23.mdx @@ -12,4 +12,4 @@ tags: ["writing-content"] 这在 Markdown 页面、OpenAPI `description` 字段和 Fern Definition `docs` 字段中都有效。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-25.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-25.mdx index 6ea28539aa..791081be63 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-25.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-25.mdx @@ -6,4 +6,4 @@ tags: ["customization", "configuration", "fern-editor"] 您现在可以直接在 Fern Editor 中更新站点的徽标、图标和标题——无需手动编辑配置文件。在编辑器中导航到站点设置以进行可视化更改。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-26.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-26.mdx index 3efb57e5bf..e8282f341b 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-26.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-26.mdx @@ -6,4 +6,4 @@ tags: ["api-reference", "ai"] 您的 Fern 文档站点现在在 `/openapi.json` 和 `/openapi.yaml` 提供原始的 OpenAPI 3.1 规范。可下载用于 SDK 生成、契约测试或导入到 Postman 等工具中。该规范还链接在您站点的 `llms.txt` 中,因此 AI 编程助手可以自动发现并使用它。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-27.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-27.mdx index d6c03e126d..20f63034ba 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-27.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-27.mdx @@ -6,7 +6,7 @@ tags: ["fern-editor", "ai"] 您现在可以查看和编辑队友的 Fern Editor 会话。如果队友创建了编辑器会话,您可以从仪表板打开他们的会话并直接将更改提交到他们的 PR 中。这样可以轻松调整文案或修复内容,无需切换到 GitHub。 -了解更多关于 [Fern Editor](/learn/docs/writing-content/fern-editor) 的信息。 +了解更多关于 [Fern Editor](/learn/zh/docs/writing-content/fern-editor) 的信息。 ## Fern Writer 中的拉取请求归属 @@ -19,4 +19,4 @@ Fern Writer 现在在每个拉取请求描述中包含 **请求者** 字段, /> - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-28.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-28.mdx index dc825606c6..7a4ce2f4f9 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-28.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-28.mdx @@ -4,7 +4,7 @@ tags: ["customization", "configuration", "docs.yml"] ## 使用 Fern Editor 的"编辑此页面"功能 -"编辑此页面"按钮现在除了链接到 GitHub 外,还可以打开 Fern Editor。[当您将启动模式设置为 `dashboard`](/learn/docs/configuration/site-level-settings#edit-this-page-configuration) 时,点击按钮会让用户选择在 Fern Editor 中编辑页面或在 GitHub 上查看源代码。这对于内部文档站点特别有用,因为大多数查看者也是编辑者。 +"编辑此页面"按钮现在除了链接到 GitHub 外,还可以打开 Fern Editor。[当您将启动模式设置为 `dashboard`](/learn/zh/docs/configuration/site-level-settings#edit-this-page-configuration) 时,点击按钮会让用户选择在 Fern Editor 中编辑页面或在 GitHub 上查看源代码。这对于内部文档站点特别有用,因为大多数查看者也是编辑者。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-04-10.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-04-10.mdx index 09c40ff078..28a6c05307 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-04-10.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-04-10.mdx @@ -16,4 +16,4 @@ agents: 需要 Fern CLI 版本 `4.67.0` 或更高版本。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-04-11.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-04-11.mdx index 9fc946e5b0..a738dfb585 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-04-11.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-04-11.mdx @@ -6,4 +6,4 @@ tags: ["api-reference", "ai"] 对于包含 WebSocket 通道的站点,Fern 文档站点在 `/asyncapi.json` 和 `/asyncapi.yaml` 提供您的原始 AsyncAPI 2.6.0 规范。下载它用于客户端生成、合约测试或导入到兼容 AsyncAPI 的工具中。该规范也从您站点的 `llms.txt` 链接,因此 AI 编码助手可以自动发现和使用它。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-04-14.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-04-14.mdx index 6ea8f6b289..47921d8444 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-04-14.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-04-14.mdx @@ -6,7 +6,7 @@ tags: ["ai-features", "api-reference", "mdx"] Ask Fern 现在使用 [Claude 4.6 Sonnet](https://www.anthropic.com/news/claude-sonnet-4-6) 和 [Claude 4.5 Haiku](https://www.anthropic.com/news/claude-haiku-4-5)。 - + ## 使用 `api:` 语法链接到 API Reference 部分 @@ -16,4 +16,4 @@ Ask Fern 现在使用 [Claude 4.6 Sonnet](https://www.anthropic.com/news/claude- Explore the [Plant Store API](api:plant-store) reference. ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-04-20.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-04-20.mdx index 2f625246a7..a3f8fbe930 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-04-20.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-04-20.mdx @@ -4,7 +4,7 @@ tags: ["navigation", "configuration", "docs.yml"] ## 移动端目录栏 -使用 [`guide` 和 `overview` 布局](/learn/docs/configuration/page-level-settings#layout)的页面现在可以在移动端和平板设备视口中在头部下方显示粘性目录栏。该栏显示滚动进度指示器和当前标题,点击时展开为完整目录。 +使用 [`guide` 和 `overview` 布局](/learn/zh/docs/configuration/page-level-settings#layout)的页面现在可以在移动端和平板设备视口中在头部下方显示粘性目录栏。该栏显示滚动进度指示器和当前标题,点击时展开为完整目录。 - + ## 每条目更新日志标签 @@ -32,4 +32,4 @@ 单个条目页面上的标签可点击,点击后链接回时间线并预选该标签作为过滤器。 - + diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-06-30.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-06-30.mdx index 8d8e200766..bedbd0a075 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-06-30.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-06-30.mdx @@ -12,4 +12,4 @@ page-actions: mcp: false ``` - + diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-07-01.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-07-01.mdx index 48ac91323c..ef896f38ab 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-07-01.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-07-01.mdx @@ -24,4 +24,4 @@ layout: classic 单个更新日志的覆盖优先于站点范围设置。 - + diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-07-07.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-07-07.mdx index 3b199070ef..8cc0fd0b68 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-07-07.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-07-07.mdx @@ -4,4 +4,4 @@ 对不存在的 `.md` URL 的请求现在会返回最多三个链接到最接近匹配来源的"相似页面"建议,使 agent 无需单独查找即可从损坏的链接中恢复。 - + diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/badges.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/badges.mdx index f2e0ed3792..9db6099a13 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/badges.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/badges.mdx @@ -5,7 +5,7 @@ sidebar-title: 徽章组件 --- -使用 `` 组件来显示小块信息,例如状态指示器、类别、版本或发布日期。要显示更长的注释,请使用[标注](/docs/writing-content/components/callouts)。 +使用 `` 组件来显示小块信息,例如状态指示器、类别、版本或发布日期。要显示更长的注释,请使用[标注](/learn/zh/docs/writing-content/components/callouts)。 ## 用法 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/button.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/button.mdx index ce572f9bd3..f8588a9cbb 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/button.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/button.mdx @@ -107,7 +107,7 @@ sidebar-title: 按钮组件
- +
diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/callouts.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/callouts.mdx index 091c2aa367..6f7feb79b4 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/callouts.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/callouts.mdx @@ -6,7 +6,7 @@ sidebar-title: 提示框组件 `` 组件用于在文档中突出显示重要信息、警告或提示。使用提示框来强调读者不应错过的关键细节,如破坏性更改、先决条件或有用的最佳实践。 -要显示非常简短的信息(如状态指示器和版本号),请使用[标记](/docs/writing-content/components/badges)。 +要显示非常简短的信息(如状态指示器和版本号),请使用[标记](/learn/zh/docs/writing-content/components/badges)。 ## 使用方法 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/cards.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/cards.mdx index b8fe8d9d92..1c17d69001 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/cards.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/cards.mdx @@ -16,7 +16,7 @@ description: '使用卡片在框中展示内容' icon 字段引用一个 Font Awesome 图标。 @@ -43,28 +43,28 @@ description: '使用卡片在框中展示内容' 了解如何为植物浇水 了解不同植物的光照需求 为植物的最佳生长选择合适的土壤 施肥以保持植物健康 @@ -113,7 +113,7 @@ description: '使用卡片在框中展示内容' } - href="/learn/docs/writing-content/components/cards" + href="/learn/zh/docs/writing-content/components/cards" > 传入 image 标签以使用自定义图标。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/code-blocks.mdx index 9bd7a9911e..e67f874bec 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -544,7 +544,7 @@ garden = store.getGarden(garden_id="456")
- 代码块会自动与[相同语言的标签页](/docs/writing-content/components/tabs#language-synchronization)同步。 + 代码块会自动与[相同语言的标签页](/learn/zh/docs/writing-content/components/tabs#language-synchronization)同步。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/download.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/download.mdx index d75a786fc6..2779637dfa 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/download.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/download.mdx @@ -7,7 +7,7 @@ sidebar-title: 下载组件 `` 组件允许用户直接从您的文档中下载诸如 PDF 等资源。您可以将其用于单个文件或将多个文件打包为 ZIP 下载。 -有关如何嵌入图像、PDF 和其他资源的信息,请查看 [Markdown 富媒体](/learn/docs/writing-content/markdown-media) 文档。 +有关如何嵌入图像、PDF 和其他资源的信息,请查看 [Markdown 富媒体](/learn/zh/docs/writing-content/markdown-media) 文档。 ## 用法 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-request-snippet.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-request-snippet.mdx index c0a89c36ec..ab42c4fbeb 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-request-snippet.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-request-snippet.mdx @@ -108,7 +108,7 @@ description: 了解如何在 Fern 中使用 EndpointRequestSnippet 组件,在 ## 属性 - 要显示的端点,格式为 `METHOD /path`(例如:`POST /chat/{domain}`)。如果您的 API 使用[命名空间](/learn/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请在前面加上命名空间和 `::`(例如:`payments::POST /chat/{domain}`)。 + 要显示的端点,格式为 `METHOD /path`(例如:`POST /chat/{domain}`)。如果您的 API 使用[命名空间](/learn/zh/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请在前面加上命名空间和 `::`(例如:`payments::POST /chat/{domain}`)。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-response-snippet.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-response-snippet.mdx index 95157f0a9e..953a473fbf 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-response-snippet.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-response-snippet.mdx @@ -53,7 +53,7 @@ description: '从你的 API 参考中引用端点响应' ## 属性 - 要显示的端点,格式为 `METHOD /path`(例如 `POST /chat/{domain}`)。如果你的 API 使用[命名空间](/learn/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请在前面添加命名空间和 `::`(例如 `payments::POST /chat/{domain}`)。 + 要显示的端点,格式为 `METHOD /path`(例如 `POST /chat/{domain}`)。如果你的 API 使用[命名空间](/learn/zh/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请在前面添加命名空间和 `::`(例如 `payments::POST /chat/{domain}`)。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-schema-snippet.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-schema-snippet.mdx index d7e59d552c..03a123e2c9 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-schema-snippet.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-schema-snippet.mdx @@ -7,7 +7,7 @@ sidebar-title: 端点模式代码片段 `` 组件显示来自 API Reference 的端点模式。默认情况下,它渲染完整的模式,或者您可以使用 `selector` 属性来显示特定部分,如请求体、响应、路径参数或查询参数。 -要按名称显示任何类型定义(不限于端点模式),请使用 [``](/learn/docs/writing-content/components/schema) 组件。 +要按名称显示任何类型定义(不限于端点模式),请使用 [``](/learn/zh/docs/writing-content/components/schema) 组件。 尚不支持富 Markdown 字段描述,将显示为纯文本。请参见下面的[请求路径](#request-path)示例。 @@ -107,7 +107,7 @@ sidebar-title: 端点模式代码片段 ## 属性 - 要显示的端点,格式为 `METHOD /path`(例如,`POST /chat/{domain}`)。如果您的 API 使用[命名空间](/learn/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请在前面加上命名空间和 `::`(例如,`payments::POST /chat/{domain}`)。 + 要显示的端点,格式为 `METHOD /path`(例如,`POST /chat/{domain}`)。如果您的 API 使用[命名空间](/learn/zh/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请在前面加上命名空间和 `::`(例如,`payments::POST /chat/{domain}`)。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/files.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/files.mdx index 685918235d..8f55f0b520 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/files.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/files.mdx @@ -21,7 +21,7 @@ sidebar-title: 文件组件 - +
@@ -66,7 +66,7 @@ sidebar-title: 文件组件 - +
@@ -101,15 +101,15 @@ sidebar-title: 文件组件
- - - - + + + + - +
@@ -145,7 +145,7 @@ sidebar-title: 文件组件 - +
@@ -168,7 +168,7 @@ sidebar-title: 文件组件 ### 行高亮和注释 -使用 `highlighted` 属性来高亮显示特定的文件或文件夹,以强调背景颜色。使用 `comment` 属性添加出现在项目旁边的解释性文本。这些属性对于引起对重要文件的注意或提供额外上下文很有用,类似于代码块支持[行高亮](/learn/docs/writing-content/components/code-blocks#line-highlighting)和内联注释。 +使用 `highlighted` 属性来高亮显示特定的文件或文件夹,以强调背景颜色。使用 `comment` 属性添加出现在项目旁边的解释性文本。这些属性对于引起对重要文件的注意或提供额外上下文很有用,类似于代码块支持[行高亮](/learn/zh/docs/writing-content/components/code-blocks#line-highlighting)和内联注释。
@@ -181,7 +181,7 @@ sidebar-title: 文件组件 - +
diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/if.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/if.mdx index 707e6a4318..5a9ef56510 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/if.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/if.mdx @@ -10,7 +10,7 @@ sidebar-title: 条件组件 ### 按产品 -使用 `products` 属性来仅在读者查看特定[产品](/learn/docs/configuration/products)时显示内容。`products` 数组中的值对应于您的 `docs.yml` 中定义的产品标识符。 +使用 `products` 属性来仅在读者查看特定[产品](/learn/zh/docs/configuration/products)时显示内容。`products` 数组中的值对应于您的 `docs.yml` 中定义的产品标识符。 ```jsx Markdown @@ -24,7 +24,7 @@ sidebar-title: 条件组件 ### 按版本 -使用 `versions` 属性来仅在读者查看特定[版本](/learn/docs/configuration/versions)时显示内容。`versions` 数组中的值对应于您的 `docs.yml` 中定义的版本标识符。 +使用 `versions` 属性来仅在读者查看特定[版本](/learn/zh/docs/configuration/versions)时显示内容。`versions` 数组中的值对应于您的 `docs.yml` 中定义的版本标识符。 ```jsx Markdown @@ -38,7 +38,7 @@ sidebar-title: 条件组件 ### 按角色 -使用 `roles` 属性来根据已认证用户的角色显示内容。`roles` 数组中的值对应于您的[基于角色的访问控制](/learn/docs/authentication/features/rbac)配置中定义的角色。 +使用 `roles` 属性来根据已认证用户的角色显示内容。`roles` 数组中的值对应于您的[基于角色的访问控制](/learn/zh/docs/authentication/features/rbac)配置中定义的角色。 ```jsx Markdown diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/overview.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/overview.mdx index e8c36f3f2f..5e3c167159 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/overview.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/overview.mdx @@ -11,182 +11,182 @@ Fern 包含 26 个内置组件,用于创建交互式文档。选择下面的 用于常见问题和可折叠内容的可展开部分 为段落、表格和其他内容提供可链接的锚点 定位在页面右侧的内容粘性容器 用于状态、版本和元数据的小标签 具有多种变体和意图的交互式按钮组件 用于重要信息、警告和提示的突出显示框 带有可选图标和链接的视觉上独特的框 具有语法高亮和交互功能的代码示例 使文本可通过点击复制按钮进行复制 下载 PDF 和其他资源 来自您的 API 参考的端点请求片段 来自您的 API 参考的端点响应片段 来自您的 API 参考的端点模式片段 显示带有可展开文件夹的交互式文件树结构 带有可选标题和背景的图像容器 用于视觉元素的 Font Awesome 图标 根据实例、产品、版本或用户角色显示或隐藏内容 为嵌套内容提供缩进和引导线的视觉层次结构 具有一致格式的 API 参数文档 用于测试 API 端点的交互式请求构建器 显示来自您的 API 参考的任何类型定义 具有自动编号和锚点链接的顺序指令 在行和列中显示数据,带有可选的粘性标题 用于组织相关内容的选项卡界面 在悬停时显示的附加信息 根据版本选择显示不同内容 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/prompt.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/prompt.mdx index 08ae55b9a9..9223b792b2 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/prompt.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/prompt.mdx @@ -216,7 +216,7 @@ Generate a TypeScript SDK from my OpenAPI spec. Follow the [TypeScript SDK quick - 显示在提示文本左侧的 [Font Awesome 图标](/learn/docs/writing-content/components/icons)名称或图片 URL。省略时默认为闪光图标。 + 显示在提示文本左侧的 [Font Awesome 图标](/learn/zh/docs/writing-content/components/icons)名称或图片 URL。省略时默认为闪光图标。 @@ -230,7 +230,7 @@ Generate a TypeScript SDK from my OpenAPI spec. Follow the [TypeScript SDK quick 自定义操作的目标 URL。使用 `{prompt}` 作为 URL 编码提示主体的占位符。如果省略,提示将作为 `prompt` 查询参数附加。仅支持 `http` 和 `https` URL。 - 显示在自定义操作按钮中的 [Font Awesome 图标](/learn/docs/writing-content/components/icons)名称或图片 URL。省略时默认为闪光图标。 + 显示在自定义操作按钮中的 [Font Awesome 图标](/learn/zh/docs/writing-content/components/icons)名称或图片 URL。省略时默认为闪光图标。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/runnable-endpoint.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/runnable-endpoint.mdx index f683d28904..c724b54bd1 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/runnable-endpoint.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/runnable-endpoint.mdx @@ -33,7 +33,7 @@ description: 使用 RunnableEndpoint 在您的文档中添加可测试的 API ## 属性 - 端点定位符,格式为 "METHOD /path"。例如:`"POST /api/users"` 或 `"GET /api/users/{id}"`。如果您的 API 使用[命名空间](/learn/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请在前面加上命名空间和 `::` (例如,`"payments::POST /api/users"`)。 + 端点定位符,格式为 "METHOD /path"。例如:`"POST /api/users"` 或 `"GET /api/users/{id}"`。如果您的 API 使用[命名空间](/learn/zh/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请在前面加上命名空间和 `::` (例如,`"payments::POST /api/users"`)。 @@ -41,7 +41,7 @@ description: 使用 RunnableEndpoint 在您的文档中添加可测试的 API - 设置端点的默认环境。该值必须对应于 API 规范中定义的服务器 URL 的 [`x-fern-server-name`](/learn/api-definitions/openapi/extensions/server-names-and-url-templating)。如果未指定,默认使用第一个环境。 + 设置端点的默认环境。该值必须对应于 API 规范中定义的服务器 URL 的 [`x-fern-server-name`](/learn/zh/api-definitions/openapi/extensions/server-names-and-url-templating)。如果未指定,默认使用第一个环境。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/schema-snippet.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/schema-snippet.mdx index 1bb804fc7a..359f442ec8 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/schema-snippet.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/schema-snippet.mdx @@ -4,7 +4,7 @@ description: 了解如何在 Fern 中使用 SchemaSnippet 组件在文档中将 sidebar-title: 模式代码片段 --- -`` 组件将 API 参考中的类型定义显示为 JSON 代码块。您可以单独使用它来显示 JSON 表示,或将其与 [``](/learn/docs/writing-content/components/schema) 组件配对使用,同时显示逐字段分解和 JSON。 +`` 组件将 API 参考中的类型定义显示为 JSON 代码块。您可以单独使用它来显示 JSON 表示,或将其与 [``](/learn/zh/docs/writing-content/components/schema) 组件配对使用,同时显示逐字段分解和 JSON。 该组件仅发现由端点引用的类型。专门由 websocket 或 webhook 使用的类型将不可用。如果多个 API 具有相同的类型名称,该组件会返回第一个匹配项。 @@ -12,7 +12,7 @@ sidebar-title: 模式代码片段 ## 用法 -该组件与[已在 `docs.yml` 中配置的 API 参考](/learn/docs/api-references/overview)一起使用。此示例将 `AIChatConfig` 类型显示为 JSON 代码块: +该组件与[已在 `docs.yml` 中配置的 API 参考](/learn/zh/docs/api-references/overview)一起使用。此示例将 `AIChatConfig` 类型显示为 JSON 代码块:
diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/schema.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/schema.mdx index bc0a17fca3..7bf28c76e5 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/schema.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/schema.mdx @@ -6,7 +6,7 @@ sidebar-title: 模式组件 `` 组件可以在您的文档中的任何位置显示API参考中的类型定义。使用它来在API参考页面之外引用数据模型、请求对象或响应类型。 -与 [``](/learn/docs/writing-content/components/endpoint-schema-snippet) 类似,但接受任何类型名称,而不仅限于端点特定的模式。可以与 [``](/learn/docs/writing-content/components/schema-snippet) 配对使用,在字段分解旁边显示JSON表示。 +与 [``](/learn/zh/docs/writing-content/components/endpoint-schema-snippet) 类似,但接受任何类型名称,而不仅限于端点特定的模式。可以与 [``](/learn/zh/docs/writing-content/components/schema-snippet) 配对使用,在字段分解旁边显示JSON表示。 该组件只能发现被端点引用的类型。仅被WebSocket或Webhook使用的类型将不可用。如果多个API具有相同的类型名称,组件会返回第一个匹配项。 @@ -14,7 +14,7 @@ sidebar-title: 模式组件 ## 使用方法 -该组件与[已在您的 `docs.yml` 中配置的API参考](/learn/docs/api-references/overview)配合使用。此示例显示来自 `docs-yml` API的 `AIChatConfig` 类型: +该组件与[已在您的 `docs.yml` 中配置的API参考](/learn/zh/docs/api-references/overview)配合使用。此示例显示来自 `docs-yml` API的 `AIChatConfig` 类型:
diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/tabs.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/tabs.mdx index 7ab84a7a32..42bb3ad4fe 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/tabs.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/tabs.mdx @@ -43,7 +43,7 @@ description: 标签页组件支持以分页视图展示相关内容,并可在 ### 语言同步 -设置了 [相同语言](/learn/docs/writing-content/components/code-blocks#supported-languages) 的标签页会在整个文档站点中自动同步。当用户选择某种语言时,所有该语言的标签页都会同步切换。语言偏好会跨浏览器会话保留。 +设置了 [相同语言](/learn/zh/docs/writing-content/components/code-blocks#supported-languages) 的标签页会在整个文档站点中自动同步。当用户选择某种语言时,所有该语言的标签页都会同步切换。语言偏好会跨浏览器会话保留。
@@ -108,7 +108,7 @@ description: 标签页组件支持以分页视图展示相关内容,并可在 - 启用了语言的标签页会自动与 [相同语言的代码块](/docs/writing-content/components/code-blocks#language-synchronization) 同步。 + 启用了语言的标签页会自动与 [相同语言的代码块](/learn/zh/docs/writing-content/components/code-blocks#language-synchronization) 同步。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/versions.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/versions.mdx index 4144d54be6..5c2eeb07d5 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/versions.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/versions.mdx @@ -8,7 +8,7 @@ sidebar-title: 版本 `` 组件根据版本选择显示不同内容。用户可以使用下拉菜单在版本之间切换,选择的版本会持久化保存在 URL 查询参数中。 - 若要对整个文档站点进行版本控制,请使用[站点级版本控制](/learn/docs/configuration/versions)。您可以独立使用站点级版本控制和 `` 组件,也可以同时使用。 + 若要对整个文档站点进行版本控制,请使用[站点级版本控制](/learn/zh/docs/configuration/versions)。您可以独立使用站点级版本控制和 `` 组件,也可以同时使用。 ## 用法 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/webhook-payload-snippet.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/webhook-payload-snippet.mdx index fd643ad284..be806ffe55 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/webhook-payload-snippet.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/webhook-payload-snippet.mdx @@ -6,7 +6,7 @@ description: 从您的 API 参考中引用 webhook 负载,以在文档中显 `` 组件从您的 API 参考中显示 webhook 的请求负载架构。它呈现与 webhook 完整 API 参考页面相同的字段、类型和示例值,因此读者可以在您的内容中内联检查负载。 -要显示常规 HTTP 端点的架构,请使用 [``](/learn/docs/writing-content/components/endpoint-schema-snippet) 组件。 +要显示常规 HTTP 端点的架构,请使用 [``](/learn/zh/docs/writing-content/components/endpoint-schema-snippet) 组件。 ## 用法 @@ -25,5 +25,5 @@ description: 从您的 API 参考中引用 webhook 负载,以在文档中显 ## 属性 - 要显示的 webhook 的 `operationId`。如果您的 API 使用[命名空间](/learn/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请使用命名空间和 `::` 作为前缀(例如,`payments::on-payment-succeeded`)。 + 要显示的 webhook 的 `operationId`。如果您的 API 使用[命名空间](/learn/zh/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请使用命名空间和 `::` 作为前缀(例如,`payments::on-payment-succeeded`)。 diff --git a/fern/translations/zh/products/docs/pages/component-library/writing-content/markdown-basics.mdx b/fern/translations/zh/products/docs/pages/component-library/writing-content/markdown-basics.mdx index 5595f55624..47b9c1a8a9 100644 --- a/fern/translations/zh/products/docs/pages/component-library/writing-content/markdown-basics.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/writing-content/markdown-basics.mdx @@ -13,7 +13,7 @@ description: 使用 Markdown 和 MDX 为你的 Fern 文档站点添加内容, 通过创建 Markdown (`.md`) 或 MDX (`.mdx`) 文件手动为你的文档添加页面。初次接触 Markdown?查看 [Markdown Guide: Getting started](https://www.markdownguide.org/getting-started/)。 -将你的页面放在 `fern/` 文件夹内,并在 `docs.yml` 文件的[导航设置](/learn/docs/configuration/navigation)中链接到它们。 +将你的页面放在 `fern/` 文件夹内,并在 `docs.yml` 文件的[导航设置](/learn/zh/docs/configuration/navigation)中链接到它们。 在下面的例子中,MDX 文件放在名为 `pages/` 的文件夹内。 @@ -55,10 +55,10 @@ Fern 使用 `docs.yml` 中的 `page` 值自动为每个页面生成 `

` 页 ### 链接格式 -要链接到文档站点上的另一个页面,请写目标的**已发布站点路径**,以 `/` 开头。Fern 从你的[`docs.yml` 和产品 YAML 文件](/learn/docs/configuration/navigation)中的 slugs 构建此路径,而不是从磁盘上的文件位置构建。要链接到另一个页面的标题,请在路径后追加 `#anchor`。 +要链接到文档站点上的另一个页面,请写目标的**已发布站点路径**,以 `/` 开头。Fern 从你的[`docs.yml` 和产品 YAML 文件](/learn/zh/docs/configuration/navigation)中的 slugs 构建此路径,而不是从磁盘上的文件位置构建。要链接到另一个页面的标题,请在路径后追加 `#anchor`。 - 内页链接不支持文件相对路径如 `./` 和 `../` — 请使用已发布的站点路径代替。(文件相对路径仍然适用于[图片和其他媒体](/learn/docs/writing-content/markdown-media)以及 YAML 配置中的 `path:` 引用。) + 内页链接不支持文件相对路径如 `./` 和 `../` — 请使用已发布的站点路径代替。(文件相对路径仍然适用于[图片和其他媒体](/learn/zh/docs/writing-content/markdown-media)以及 YAML 配置中的 `path:` 引用。) @@ -69,11 +69,11 @@ Fern 使用 `docs.yml` 中的 `page` 值自动为每个页面生成 `

` 页 ``` -在[版本化文档](/learn/docs/configuration/versions)中,相同的路径会根据你写的是无版本形式(默认版本)还是有版本形式(例如 `/learn/docs/v2/getting-started`)而跳转到不同版本。对于单个页面内的内联版本特定内容,请使用 [``](/learn/docs/writing-content/components/if#by-version) 或 [``](/learn/docs/writing-content/components/versions)。 +在[版本化文档](/learn/zh/docs/configuration/versions)中,相同的路径会根据你写的是无版本形式(默认版本)还是有版本形式(例如 `/learn/docs/v2/getting-started`)而跳转到不同版本。对于单个页面内的内联版本特定内容,请使用 [``](/learn/zh/docs/writing-content/components/if#by-version) 或 [``](/learn/zh/docs/writing-content/components/versions)。 ### 验证链接 -Fern 提供两种捕获损坏链接的方法。[`broken-links` 规则](/learn/docs/configuration/site-level-settings#check-configuration) — 由 [`fern check`](/learn/cli-api-reference/cli-reference/commands#fern-check) 运行,包括在 `fern docs dev` 期间 — 验证每个内部链接是否符合从你的**本地** YAML 构建的导航树。要检查已发布站点上的链接,请使用 [`fern docs link check`](/learn/cli-api-reference/cli-reference/commands#fern-docs-link-check) 或 [Fern Dashboard](https://dashboard.buildwithfern.com/)。 +Fern 提供两种捕获损坏链接的方法。[`broken-links` 规则](/learn/zh/docs/configuration/site-level-settings#check-configuration) — 由 [`fern check`](/learn/zh/cli-api-reference/cli-reference/commands#fern-check) 运行,包括在 `fern docs dev` 期间 — 验证每个内部链接是否符合从你的**本地** YAML 构建的导航树。要检查已发布站点上的链接,请使用 [`fern docs link check`](/learn/zh/cli-api-reference/cli-reference/commands#fern-docs-link-check) 或 [Fern Dashboard](https://dashboard.buildwithfern.com/)。 | | `fern check` broken-links 规则 | `fern docs link check` | |---|---|---| @@ -90,7 +90,7 @@ Fern 提供两种捕获损坏链接的方法。[`broken-links` 规则](/learn/do -[了解更多](/learn/docs/configuration/navigation)关于链接和其他导航元素。 +[了解更多](/learn/zh/docs/configuration/navigation)关于链接和其他导航元素。 ## 表格 @@ -103,8 +103,8 @@ Fern 提供两种捕获损坏链接的方法。[`broken-links` 规则](/learn/do | 行 2 | 数据 | 数据 | ``` -对于更高级的表格功能,如为较长数据集提供粘性标题,请参阅 [Table 组件](/learn/docs/writing-content/components/tables)文档。 +对于更高级的表格功能,如为较长数据集提供粘性标题,请参阅 [Table 组件](/learn/zh/docs/writing-content/components/tables)文档。 ## Fern 组件 -Fern 有一个内置的组件库,你可以在 Markdown 中使用。[探索这些组件。](/learn/docs/writing-content/components/overview) +Fern 有一个内置的组件库,你可以在 Markdown 中使用。[探索这些组件。](/learn/zh/docs/writing-content/components/overview) diff --git a/fern/translations/zh/products/docs/pages/component-library/writing-content/markdown-media.mdx b/fern/translations/zh/products/docs/pages/component-library/writing-content/markdown-media.mdx index 07aa86a637..009f8953c7 100644 --- a/fern/translations/zh/products/docs/pages/component-library/writing-content/markdown-media.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/writing-content/markdown-media.mdx @@ -198,7 +198,7 @@ sidebar-title: Markdown 中的富媒体 -[嵌入 Fern 文档站点](/learn/docs/customization/embedded-mode)到其他应用程序时,请在 URL 后追加 `?embedded=true` 以隐藏页头和页脚。 +[嵌入 Fern 文档站点](/learn/zh/docs/customization/embedded-mode)到其他应用程序时,请在 URL 后追加 `?embedded=true` 以隐藏页头和页脚。 ## LaTeX diff --git a/fern/translations/zh/products/docs/pages/component-library/writing-content/visual-editor.mdx b/fern/translations/zh/products/docs/pages/component-library/writing-content/visual-editor.mdx index ee59a1956d..48b9eda316 100644 --- a/fern/translations/zh/products/docs/pages/component-library/writing-content/visual-editor.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/writing-content/visual-editor.mdx @@ -48,20 +48,20 @@ Fern Editor 让团队成员(如内容作者、产品经理和营销人员) -安装 [Fern GitHub 应用](https://github.com/apps/fern-api),然后在[控制台](https://dashboard.buildwithfern.com/)中[连接您的仓库](/learn/dashboard/configuration/github-repo)。 +安装 [Fern GitHub 应用](https://github.com/apps/fern-api),然后在[控制台](https://dashboard.buildwithfern.com/)中[连接您的仓库](/learn/zh/dashboard/configuration/github-repo)。 GitLab 需要手动设置: 1. 在 GitLab 中[创建个人访问令牌](https://gitlab.com/-/user_settings/personal_access_tokens),包含以下权限范围:`read_user`、`api`、`write_repository`、`read_repository`、`read_api`。将过期日期设置得很久以后,以避免中断您的编辑器体验——您可以随时撤销令牌。 2. 通过 Slack 或[邮件](mailto:support@buildwithfern.com)联系 Fern 支持,提供您的访问令牌和 GitLab 仓库 URL。 -3. 一旦 Fern 配置了连接,在[控制台](https://dashboard.buildwithfern.com/)中[连接您的仓库](/learn/dashboard/configuration/github-repo)。 +3. 一旦 Fern 配置了连接,在[控制台](https://dashboard.buildwithfern.com/)中[连接您的仓库](/learn/zh/dashboard/configuration/github-repo)。 ### 设置权限 -为您的组织配置[成员权限](/learn/dashboard/configuration/permissions),以控制谁可以使用 Fern Editor。管理员和编辑者可以进行更改;查看者只有只读访问权限。 +为您的组织配置[成员权限](/learn/zh/dashboard/configuration/permissions),以控制谁可以使用 Fern Editor。管理员和编辑者可以进行更改;查看者只有只读访问权限。 ### 打开编辑器 @@ -81,25 +81,25 @@ Fern Editor 支持创建和编辑以下组件: | 组件 | 支持状态 | | --- | --- | -| [手风琴](/learn/docs/writing-content/components/accordions) | 已支持 | -| [手风琴组](/learn/docs/writing-content/components/accordion-groups) | 已支持 | -| [侧边栏](/learn/docs/writing-content/components/aside) | 即将推出 | -| [按钮](/learn/docs/writing-content/components/button) | 已支持 | -| [标注](/learn/docs/writing-content/components/callouts) | 已支持 | -| [卡片](/learn/docs/writing-content/components/cards) | 已支持 | -| [卡片组](/learn/docs/writing-content/components/card-groups) | 已支持 | -| [代码块](/learn/docs/writing-content/components/code-blocks) | 已支持 | -| [嵌入](/learn/docs/writing-content/components/embed) | 已支持 | -| [端点请求片段](/learn/docs/writing-content/components/request-snippet) | 已支持 | -| [端点响应片段](/learn/docs/writing-content/components/response-snippet) | 已支持 | -| [端点模式片段](/learn/docs/writing-content/components/endpoint-schema-snippet) | 已支持 | -| [框架](/learn/docs/writing-content/components/frames) | 即将推出 | -| [图标](/learn/docs/writing-content/components/icons) | 即将推出 | -| [参数字段](/learn/docs/writing-content/components/parameter-fields) | 已支持 | -| [步骤](/learn/docs/writing-content/components/steps) | 已支持 | -| [表格](/learn/docs/writing-content/components/tables) | 已支持 | -| [固定表格](/learn/docs/writing-content/components/tables#sticky-tables) | 即将推出 | -| [标签页](/learn/docs/writing-content/components/tabs) | 已支持 | -| [工具提示](/learn/docs/writing-content/components/tooltips) | 已支持 | +| [手风琴](/learn/zh/docs/writing-content/components/accordions) | 已支持 | +| [手风琴组](/learn/zh/docs/writing-content/components/accordions) | 已支持 | +| [侧边栏](/learn/zh/docs/writing-content/components/aside) | 即将推出 | +| [按钮](/learn/zh/docs/writing-content/components/button) | 已支持 | +| [标注](/learn/zh/docs/writing-content/components/callouts) | 已支持 | +| [卡片](/learn/zh/docs/writing-content/components/cards) | 已支持 | +| [卡片组](/learn/zh/docs/writing-content/components/cards) | 已支持 | +| [代码块](/learn/zh/docs/writing-content/components/code-blocks) | 已支持 | +| [嵌入](/learn/zh/docs/writing-content/components/download) | 已支持 | +| [端点请求片段](/learn/zh/docs/writing-content/components/request-snippet) | 已支持 | +| [端点响应片段](/learn/zh/docs/writing-content/components/response-snippet) | 已支持 | +| [端点模式片段](/learn/zh/docs/writing-content/components/endpoint-schema-snippet) | 已支持 | +| [框架](/learn/zh/docs/writing-content/components/frames) | 即将推出 | +| [图标](/learn/zh/docs/writing-content/components/icons) | 即将推出 | +| [参数字段](/learn/zh/docs/writing-content/components/parameter-fields) | 已支持 | +| [步骤](/learn/zh/docs/writing-content/components/steps) | 已支持 | +| [表格](/learn/zh/docs/writing-content/components/tables) | 已支持 | +| [固定表格](/learn/zh/docs/writing-content/components/tables#sticky-tables) | 即将推出 | +| [标签页](/learn/zh/docs/writing-content/components/tabs) | 已支持 | +| [工具提示](/learn/zh/docs/writing-content/components/tooltips) | 已支持 | \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/customization/announcement-banner.mdx b/fern/translations/zh/products/docs/pages/customization/announcement-banner.mdx index 48614e6753..8db181febf 100644 --- a/fern/translations/zh/products/docs/pages/customization/announcement-banner.mdx +++ b/fern/translations/zh/products/docs/pages/customization/announcement-banner.mdx @@ -11,7 +11,7 @@ announcement: message: "🚀 新功能:公告功能已上线!(了解更多) 🚀" ``` -公告消息支持 Markdown 和 HTML。您可以包含链接、图片和其他格式。可以使用[自定义 CSS](/docs/customization/custom-css-js#custom-css) 来自定义公告的样式。 +公告消息支持 Markdown 和 HTML。您可以包含链接、图片和其他格式。可以使用[自定义 CSS](/learn/zh/docs/customization/custom-css-js#custom-css) 来自定义公告的样式。 ## 在多个级别配置公告 diff --git a/fern/translations/zh/products/docs/pages/customization/css-selectors.mdx b/fern/translations/zh/products/docs/pages/customization/css-selectors.mdx index 7d714d6bdb..f9c0d583ba 100644 --- a/fern/translations/zh/products/docs/pages/customization/css-selectors.mdx +++ b/fern/translations/zh/products/docs/pages/customization/css-selectors.mdx @@ -667,7 +667,7 @@ Fern 选择器使用 Tailwind CSS 工具类和 CSS 自定义属性。本页面 -[代码块](/learn/docs/writing-content/components/code-blocks) 的复制按钮。 +[代码块](/learn/zh/docs/writing-content/components/code-blocks) 的复制按钮。 ```css Default CSS .fern-copy-button { @@ -681,7 +681,7 @@ Fern 选择器使用 Tailwind CSS 工具类和 CSS 自定义属性。本页面 -[设置 `maxLines` 的代码块](/learn/docs/writing-content/components/code-blocks#max-height) 的展开按钮。 +[设置 `maxLines` 的代码块](/learn/zh/docs/writing-content/components/code-blocks#max-height) 的展开按钮。 ```css Default CSS .fern-expand-button { @@ -718,7 +718,7 @@ Fern 选择器使用 Tailwind CSS 工具类和 CSS 自定义属性。本页面 ## 卡片组件 -用于[卡片](/learn/docs/writing-content/components/cards)的选择器。 +用于[卡片](/learn/zh/docs/writing-content/components/cards)的选择器。 @@ -1208,7 +1208,7 @@ input.fern-input[type="number"] { ## 下拉菜单与选择器组件 -用于下拉菜单和[产品选择器](/learn/docs/configuration/products)的选择器。 +用于下拉菜单和[产品选择器](/learn/zh/docs/configuration/products)的选择器。 @@ -1410,7 +1410,7 @@ input.fern-input[type="number"] { ## 手风琴组件 -用于[手风琴组件](/learn/docs/writing-content/components/accordions)的选择器。 +用于[手风琴组件](/learn/zh/docs/writing-content/components/accordions)的选择器。 @@ -1673,7 +1673,7 @@ input.fern-input[type="number"] { ## 徽章组件 -用于[徽章](/learn/docs/writing-content/components/badges)和 HTTP 方法标签的选择器。 +用于[徽章](/learn/zh/docs/writing-content/components/badges)和 HTTP 方法标签的选择器。 @@ -1770,7 +1770,7 @@ input.fern-input[type="number"] { -[标注](/learn/docs/writing-content/components/callouts),颜色与 intent 相匹配。 +[标注](/learn/zh/docs/writing-content/components/callouts),颜色与 intent 相匹配。 ```css Default CSS .fern-callout { @@ -1800,7 +1800,7 @@ input.fern-input[type="number"] { -带垂直引导线的[缩进组件](/learn/docs/writing-content/components/indent)。 +带垂直引导线的[缩进组件](/learn/zh/docs/writing-content/components/indent)。 ```css Default CSS .fern-indent { @@ -1827,7 +1827,7 @@ input.fern-input[type="number"] { -[步骤组件](/learn/docs/writing-content/components/steps)的容器。 +[步骤组件](/learn/zh/docs/writing-content/components/steps)的容器。 ```css Default CSS .fern-steps { @@ -1843,7 +1843,7 @@ input.fern-input[type="number"] { -单个[步骤](/learn/docs/writing-content/components/steps)。 +单个[步骤](/learn/zh/docs/writing-content/components/steps)。 ```css Default CSS .fern-step > .fern-anchor { @@ -1857,7 +1857,7 @@ input.fern-input[type="number"] { -用于深度链接的[锚点组件](/learn/docs/writing-content/components/anchor)。 +用于深度链接的[锚点组件](/learn/zh/docs/writing-content/components/anchor)。 ```css Default CSS a.fern-anchor { @@ -1927,7 +1927,7 @@ a.fern-anchor { -支持 `.sticky` 类的表格,可启用[粘性表头](/learn/docs/writing-content/components/tables#sticky-tables)。 +支持 `.sticky` 类的表格,可启用[粘性表头](/learn/zh/docs/writing-content/components/tables#sticky-tables)。 ```css Default CSS .fern-table { @@ -1974,7 +1974,7 @@ a.fern-anchor { ## 变更日志筛选器组件 -用于变更日志筛选 UI 的选择器。仅在带有标签的[变更日志页面](/learn/docs/configuration/changelogs)上出现。 +用于变更日志筛选 UI 的选择器。仅在带有标签的[变更日志页面](/learn/zh/docs/configuration/changelogs)上出现。 @@ -2156,7 +2156,7 @@ a.fern-anchor { ## API Reference 组件 -用于 [API Reference](/learn/docs/api-references/overview) 组件的选择器。 +用于 [API Reference](/learn/zh/docs/api-references/overview) 组件的选择器。 @@ -2241,7 +2241,7 @@ API 属性约束。 ## 工具组件 -用于[图标](/learn/docs/writing-content/components/icons)、[工具提示](/learn/docs/writing-content/components/tooltips)和其他元素的选择器。 +用于[图标](/learn/zh/docs/writing-content/components/icons)、[工具提示](/learn/zh/docs/writing-content/components/tooltips)和其他元素的选择器。 @@ -2377,7 +2377,7 @@ API 属性约束。 -[可运行端点](/learn/docs/writing-content/components/runnable-endpoint)。 +[可运行端点](/learn/zh/docs/writing-content/components/runnable-endpoint)。 ```css Default CSS .fern-runnable-endpoint ul { @@ -2522,7 +2522,7 @@ RSS 订阅按钮。 ## 变更日志组件 -用于[变更日志页面](/learn/docs/configuration/changelogs)的选择器。 +用于[变更日志页面](/learn/zh/docs/configuration/changelogs)的选择器。 diff --git a/fern/translations/zh/products/docs/pages/customization/custom-css-js.mdx b/fern/translations/zh/products/docs/pages/customization/custom-css-js.mdx index d9daeb74f4..b609471b4b 100644 --- a/fern/translations/zh/products/docs/pages/customization/custom-css-js.mdx +++ b/fern/translations/zh/products/docs/pages/customization/custom-css-js.mdx @@ -11,13 +11,13 @@ sidebar-title: 完全自定义文档 - **CSS** 用于样式设计、视觉变更和隐藏元素 - **JavaScript** 用于客户端行为、第三方集成和小部件 -对于 MDX 内容中的服务端渲染可重用元素,请参阅 [自定义 React 组件](/learn/docs/customization/custom-react-components)。要替换 Fern 的默认页眉或页脚,请参阅 [自定义页眉和页脚](/learn/docs/customization/header-and-footer)。 +对于 MDX 内容中的服务端渲染可重用元素,请参阅 [自定义 React 组件](/learn/zh/docs/customization/custom-react-components)。要替换 Fern 的默认页眉或页脚,请参阅 [自定义页眉和页脚](/learn/zh/docs/customization/header-and-footer)。 -你也可以[直接在 `docs.yml` 文件中自定义许多内容](/docs/configuration/site-level-settings),包括颜色、排版、导航栏链接、布局、分析和元数据。在添加自定义代码之前,请先尝试这些内置选项。 +你也可以[直接在 `docs.yml` 文件中自定义许多内容](/learn/zh/docs/configuration/site-level-settings),包括颜色、排版、导航栏链接、布局、分析和元数据。在添加自定义代码之前,请先尝试这些内置选项。 ## 自定义 CSS -你可以为文档添加自定义 CSS,以进一步自定义外观和感觉。定义的类名会应用到所有 MDX 文件中。请参阅 [CSS 选择器参考](/learn/docs/customization/css-selectors-reference) 获取可用的 `.fern-*` 选择器完整列表。 +你可以为文档添加自定义 CSS,以进一步自定义外观和感觉。定义的类名会应用到所有 MDX 文件中。请参阅 [CSS 选择器参考](/learn/zh/docs/customization/css-selectors-reference) 获取可用的 `.fern-*` 选择器完整列表。 ### 创建 `styles.css` @@ -62,12 +62,12 @@ css: 要通过 Fern 的内置样式设计来自定义文档的背景、徽标、字体和布局, -请查看 [全局配置](/learn/docs/configuration/site-level-settings)。 +请查看 [全局配置](/learn/zh/docs/configuration/site-level-settings)。 ### 内置 CSS 颜色变量 -Fern 会从你的 [`docs.yml` 颜色配置](/learn/docs/configuration/site-level-settings#colors-configuration) 自动生成 CSS 变量,并将它们作为 CSS 自定义属性在样式表中提供。颜色会转换为 [oklch](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch) 以确保一致的颜色管理,并为不支持的浏览器提供十六进制回退。这些变量会在明暗模式之间自动适配——明亮模式使用 `.light` 和 `:root` 选择器,而暗黑模式使用 `.dark` 选择器。 +Fern 会从你的 [`docs.yml` 颜色配置](/learn/zh/docs/configuration/site-level-settings#colors-configuration) 自动生成 CSS 变量,并将它们作为 CSS 自定义属性在样式表中提供。颜色会转换为 [oklch](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch) 以确保一致的颜色管理,并为不支持的浏览器提供十六进制回退。这些变量会在明暗模式之间自动适配——明亮模式使用 `.light` 和 `:root` 选择器,而暗黑模式使用 `.dark` 选择器。 @@ -262,7 +262,7 @@ Fern 还会生成遵循 [Radix UI 步骤范式](https://www.radix-ui.com/colors/ ``` -你可以使用 CSS 类名来定位其他 Fern UI 组件。参阅 [CSS 选择器参考](/learn/docs/customization/css-selectors-reference) 获取所有可用选择器,或使用浏览器的开发者工具来检查元素。 +你可以使用 CSS 类名来定位其他 Fern UI 组件。参阅 [CSS 选择器参考](/learn/zh/docs/customization/css-selectors-reference) 获取所有可用选择器,或使用浏览器的开发者工具来检查元素。 @@ -416,6 +416,6 @@ js: ### 常见用例 -- **第三方集成:** 对于 `docs.yml` 中不原生支持的工具,通过将嵌入代码片段粘贴到自定义 JS 文件中来添加分析、会话录制、支持小部件或标签管理器。参阅 [集成第三方工具](/learn/docs/integrations/overview#connect-other-integrations-via-custom-javascript) 获取支持的工具和示例。 -- **自定义搜索:** 实现自定义搜索(还需要[你的 Algolia 凭据](/docs/customization/search)) +- **第三方集成:** 对于 `docs.yml` 中不原生支持的工具,通过将嵌入代码片段粘贴到自定义 JS 文件中来添加分析、会话录制、支持小部件或标签管理器。参阅 [集成第三方工具](/learn/zh/docs/integrations/overview#connect-other-integrations-via-custom-javascript) 获取支持的工具和示例。 +- **自定义搜索:** 实现自定义搜索(还需要[你的 Algolia 凭据](/learn/zh/docs/customization/search)) - **脚本和小部件:** 插入任何客户端脚本或可嵌入的小部件 \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/customization/custom-header-footer.mdx b/fern/translations/zh/products/docs/pages/customization/custom-header-footer.mdx index 407d865e4f..a20f2b1323 100644 --- a/fern/translations/zh/products/docs/pages/customization/custom-header-footer.mdx +++ b/fern/translations/zh/products/docs/pages/customization/custom-header-footer.mdx @@ -95,14 +95,14 @@ export default function CustomHeader({ Fern }) { | 组件 | 描述 | | --- | --- | -| `` | 您在 `docs.yml` 中配置的网站[标志](/docs/configuration/site-level-settings#logo-configuration)。链接到主页。您可以使用 `document.querySelector('#fern-header [data-fern-logo]')` 来定位此组件。 | -| `` | [搜索](/docs/customization/search)栏,如果启用的话包括 AI 搜索触发器。 | -| `` | 用于在[产品](/docs/configuration/products)之间切换的下拉菜单。 | -| `` | 用于在[版本](/docs/configuration/versions)之间切换的下拉菜单。 | -| `` | 用于切换活动 [SDK 语言](/docs/configuration/site-level-settings#default-language)的下拉菜单。 | -| `` | 在 `docs.yml` 的 `navbar-links` 下配置的[导航链接](/docs/configuration/site-level-settings#navbar-links-configuration)。 | -| `` | [身份验证文档](/docs/authentication/overview)的登录/注册按钮。 | -| `` | 在[明暗模式](/docs/configuration/site-level-settings#theme-configuration)之间切换。 | +| `` | 您在 `docs.yml` 中配置的网站[标志](/learn/zh/docs/configuration/site-level-settings#logo-configuration)。链接到主页。您可以使用 `document.querySelector('#fern-header [data-fern-logo]')` 来定位此组件。 | +| `` | [搜索](/learn/zh/docs/customization/search)栏,如果启用的话包括 AI 搜索触发器。 | +| `` | 用于在[产品](/learn/zh/docs/configuration/products)之间切换的下拉菜单。 | +| `` | 用于在[版本](/learn/zh/docs/configuration/versions)之间切换的下拉菜单。 | +| `` | 用于切换活动 [SDK 语言](/learn/zh/docs/configuration/site-level-settings#default-language)的下拉菜单。 | +| `` | 在 `docs.yml` 的 `navbar-links` 下配置的[导航链接](/learn/zh/docs/configuration/site-level-settings#navbar-links-configuration)。 | +| `` | [身份验证文档](/learn/zh/docs/authentication/overview)的登录/注册按钮。 | +| `` | 在[明暗模式](/learn/zh/docs/configuration/site-level-settings#theme-configuration)之间切换。 | | `` | Fern 内置的移动端侧边栏切换按钮。显示汉堡包/关闭图标并打开可关闭的侧边栏。仅在移动端视口上可见。 | diff --git a/fern/translations/zh/products/docs/pages/customization/custom-react-components.mdx b/fern/translations/zh/products/docs/pages/customization/custom-react-components.mdx index dd8b7a62a4..b7cdbf0b45 100644 --- a/fern/translations/zh/products/docs/pages/customization/custom-react-components.mdx +++ b/fern/translations/zh/products/docs/pages/customization/custom-react-components.mdx @@ -8,7 +8,7 @@ sidebar-title: 自定义 React 组件 您可以通过添加自定义 React 组件来扩展 Fern 的内置组件库。这允许您创建符合文档需求的独特交互式元素。组件采用服务端渲染,具有更好的 SEO 和性能表现,且不会出现布局偏移。 - 不要使用 React 组件来定义常量。请考虑使用[可重用片段](/docs/writing-content/reusable-snippets)。 + 不要使用 React 组件来定义常量。请考虑使用[可重用片段](/learn/zh/docs/writing-content/reusable-snippets)。 ## MDX 中的自定义组件 diff --git a/fern/translations/zh/products/docs/pages/customization/embedded-mode.mdx b/fern/translations/zh/products/docs/pages/customization/embedded-mode.mdx index a3bf322014..4ba936bb5c 100644 --- a/fern/translations/zh/products/docs/pages/customization/embedded-mode.mdx +++ b/fern/translations/zh/products/docs/pages/customization/embedded-mode.mdx @@ -32,4 +32,4 @@ sidebar-title: 嵌入模式 ## 嵌入外部页面 -[在文档中嵌入外部页面](/learn/docs/writing-content/markdown-media#embed-external-sites)使用相同的 `