diff --git a/fern/docs.yml b/fern/docs.yml index b5582387e..b294740a3 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -289,20 +289,20 @@ redirects: destination: /learn/sdks/overview/introduction - source: /learn/sdks/introduction/customer-showcase destination: /learn/sdks/overview/introduction - - source: /learn/sdks/introduction/changelog/ts/:slug* - destination: /learn/sdks/generators/typescript/changelog/:slug* - - source: /learn/sdks/introduction/changelog/python/:slug* - destination: /learn/sdks/generators/python/changelog/:slug* - - source: /learn/sdks/introduction/changelog/csharp/:slug* - destination: /learn/sdks/generators/csharp/changelog/:slug* - - source: /learn/sdks/introduction/changelog/go/:slug* - destination: /learn/sdks/generators/go/changelog/:slug* - - source: /learn/sdks/introduction/changelog/java/:slug* - destination: /learn/sdks/generators/java/changelog/:slug* - - source: /learn/sdks/introduction/changelog/ruby/:slug* - destination: /learn/sdks/generators/ruby/changelog/:slug* - - source: /learn/sdks/introduction/changelog/php/:slug* - destination: /learn/sdks/generators/php/changelog/:slug* + - source: /learn/sdks/introduction/changelog/ts/:slug(.*) + destination: /learn/sdks/generators/typescript/changelog/:slug(.*) + - source: /learn/sdks/introduction/changelog/python/:slug(.*) + destination: /learn/sdks/generators/python/changelog/:slug(.*) + - source: /learn/sdks/introduction/changelog/csharp/:slug(.*) + destination: /learn/sdks/generators/csharp/changelog/:slug(.*) + - source: /learn/sdks/introduction/changelog/go/:slug(.*) + destination: /learn/sdks/generators/go/changelog/:slug(.*) + - source: /learn/sdks/introduction/changelog/java/:slug(.*) + destination: /learn/sdks/generators/java/changelog/:slug(.*) + - source: /learn/sdks/introduction/changelog/ruby/:slug(.*) + destination: /learn/sdks/generators/ruby/changelog/:slug(.*) + - source: /learn/sdks/introduction/changelog/php/:slug(.*) + destination: /learn/sdks/generators/php/changelog/:slug(.*) # SDK overview (renamed pages) - source: /learn/sdks/overview/set-up-the-fern-folder @@ -699,6 +699,8 @@ redirects: destination: /learn/api-definitions/grpc/:slug* - source: /learn/api-definitions/protobuf destination: /learn/api-definitions/grpc/overview + - source: /learn/api-definitions/protobuf/:slug* + destination: /learn/api-definitions/grpc/:slug* # FernDef (specifics before catchall — comparison-with-open-api was shadowed) - source: /learn/api-definition/fern/comparison-with-open-api diff --git a/fern/products/docs/pages/navigation/tabs.mdx b/fern/products/docs/pages/navigation/tabs.mdx index 36c0c4f8c..4bc1089cc 100644 --- a/fern/products/docs/pages/navigation/tabs.mdx +++ b/fern/products/docs/pages/navigation/tabs.mdx @@ -75,6 +75,8 @@ theme: ``` +The object form (`style`, `alignment`, `placement`) requires Fern CLI 4.44.0 or later. The string shorthand (`theme.tabs: default` or `theme.tabs: bubble`) works on all versions. + ### Tab properties diff --git a/fern/products/docs/pages/seo/redirects.mdx b/fern/products/docs/pages/seo/redirects.mdx index 9605c2ab8..cc49e5e38 100644 --- a/fern/products/docs/pages/seo/redirects.mdx +++ b/fern/products/docs/pages/seo/redirects.mdx @@ -1,6 +1,6 @@ --- title: Configure redirects -subtitle: Learn how to configure redirects in Fern Docs. Set up exact path redirects and regex patterns to preserve SEO equity when pages move. +subtitle: Learn how to configure redirects in Fern Docs. Set up exact path redirects and regex patterns to preserve SEO equity when pages move or when you migrate to a new custom domain. --- Redirects map old URLs to new ones so inbound links and search rankings survive when pages move, change slugs, or are deleted. They apply to [Markdown URLs](/learn/docs/ai-features/markdown) too: a redirected page's `.md` or `.mdx` twin returns a `308` to the destination's twin. @@ -113,6 +113,23 @@ redirects: Overriding the default versioning behavior manually can lead to unexpected redirect patterns. If you frequently need to redirect from the default version to another version, change which version is set as default in your versions configuration. +## Moving to a new custom domain + +The `redirects` configuration in `docs.yml` is **path-based only**. The `source` property must be a relative path, not an absolute URL, so you cannot redirect one domain to another with a `redirects` entry. + +To forward traffic from an old custom domain to a new one, handle it at the DNS or reverse-proxy layer (Cloudflare, AWS CloudFront, Nginx, and similar), or contact Fern to register the old domain as an additional alias on the site — see [Multiple custom domains](/learn/docs/preview-publish/setting-up-your-domain#multiple-custom-domains). + +Use `redirects` for the complementary case: when paths change *within* the new domain. If the URL structure shifted during the move, map the old paths to the new ones with pattern redirects. Remember to include the subpath in both `source` and `destination` if the site is hosted on one. + + +```yaml +redirects: + # Map old path structure to new one after a domain migration + - source: "/learn/old-section/:slug(.*)" + destination: "/learn/new-section/:slug(.*)" +``` + + ## Catching missing redirects The [`missing-redirects` rule](/learn/docs/configuration/site-level-settings#check-configuration), run by [`fern check`](/learn/cli-api-reference/cli-reference/commands#fern-check), compares the navigation tree built from your local YAML against the most recently **published** state of your site and flags previously published URLs that no longer resolve and aren't covered by an entry in `redirects:`. This catches pages you've moved or removed before they start returning 404s for existing inbound links. Tune its severity in `docs.yml`. diff --git a/fern/products/sdks/generators/python/configuration.mdx b/fern/products/sdks/generators/python/configuration.mdx index b519affa0..1f39ea3f8 100644 --- a/fern/products/sdks/generators/python/configuration.mdx +++ b/fern/products/sdks/generators/python/configuration.mdx @@ -222,6 +222,22 @@ Allow specifying arbitrary configuration to your packages `pyproject.toml` by ad ``` +## License + +The `fern-python-sdk` generator has no dedicated `license` config key, unlike the Java generator's `metadata.license`. Set the license by injecting it into the generated `pyproject.toml` via the [`pyproject_toml`](#pyproject_toml) config option, whose contents are added as-is: + +```yaml title="generators.yml" +groups: + python-sdk: + generators: + - name: fern-python-sdk + version: 5.27.1 + config: + pyproject_toml: | + [tool.poetry] + license = "MIT" +``` + When enabled, the generated SDK resolves the version it reports in the `X-Fern-SDK-Version` header and the [structured `User-Agent`](#include_platform_headers) version segment at runtime with `importlib.metadata.version()`, instead of the version baked in at generation time. Enable this when external release tooling determines the published version after generation, so the reported version always matches the installed package. The generation-time version is used as a fallback when the distribution isn't installed. If [`omit_fern_headers`](#omit_fern_headers) is enabled, the SDK reports no version at all and this option has no effect.