diff --git a/docs-yml.schema.json b/docs-yml.schema.json index 541bb9df61f9..e28ec64145be 100644 --- a/docs-yml.schema.json +++ b/docs-yml.schema.json @@ -6053,7 +6053,7 @@ "type": "null" } ], - "description": "If `mobile-toc` is set to true, a sticky collapsible table of contents bar will be shown on mobile viewports for guide and overview layout pages." + "description": "A sticky collapsible table of contents bar is shown on mobile viewports for guide and overview layout pages by default. Set `mobile-toc` to false to disable it." } }, "additionalProperties": false diff --git a/fern/apis/docs-yml/definition/docs.yml b/fern/apis/docs-yml/definition/docs.yml index d53750d868b1..79179270d847 100644 --- a/fern/apis/docs-yml/definition/docs.yml +++ b/fern/apis/docs-yml/definition/docs.yml @@ -969,7 +969,7 @@ types: type: optional availability: in-development docs: | - If `mobile-toc` is set to true, a sticky collapsible table of contents bar will be shown on mobile viewports for guide and overview layout pages. + A sticky collapsible table of contents bar is shown on mobile viewports for guide and overview layout pages by default. Set `mobile-toc` to false to disable it. DocsSettingsConfig: properties: diff --git a/packages/cli/cli/changes/unreleased/mobile-toc-default-true.yml b/packages/cli/cli/changes/unreleased/mobile-toc-default-true.yml new file mode 100644 index 000000000000..d36747a7d727 --- /dev/null +++ b/packages/cli/cli/changes/unreleased/mobile-toc-default-true.yml @@ -0,0 +1,4 @@ +- summary: | + Switch mobile-toc default from opt-in (false) to opt-out (true) so the + mobile table of contents is enabled for all documentation sites by default. + type: feat diff --git a/packages/cli/configuration-loader/src/docs-yml/parseDocsConfiguration.ts b/packages/cli/configuration-loader/src/docs-yml/parseDocsConfiguration.ts index a5312aff4124..94f11c866c33 100644 --- a/packages/cli/configuration-loader/src/docs-yml/parseDocsConfiguration.ts +++ b/packages/cli/configuration-loader/src/docs-yml/parseDocsConfiguration.ts @@ -657,7 +657,7 @@ function convertLayoutConfig( disableHeader: layout.disableHeader ?? false, hideNavLinks: layout.hideNavLinks ?? false, hideFeedback: layout.hideFeedback ?? false, - mobileToc: layout.mobileToc ?? false, + mobileToc: layout.mobileToc ?? true, tabsAlignment: resolvedTabsAlignment } as unknown as docsYml.ParsedDocsConfiguration["layout"]; } diff --git a/packages/cli/configuration/src/docs-yml/schemas/sdk/api/resources/docs/types/LayoutConfig.ts b/packages/cli/configuration/src/docs-yml/schemas/sdk/api/resources/docs/types/LayoutConfig.ts index 704fc6c69881..0aa1b9a92aeb 100644 --- a/packages/cli/configuration/src/docs-yml/schemas/sdk/api/resources/docs/types/LayoutConfig.ts +++ b/packages/cli/configuration/src/docs-yml/schemas/sdk/api/resources/docs/types/LayoutConfig.ts @@ -94,6 +94,6 @@ export interface LayoutConfig { hideNavLinks?: boolean; /** If `hide-feedback` is set to true, the feedback button will not be rendered. This can be overridden for a specific page using the frontmatter. */ hideFeedback?: boolean; - /** If `mobile-toc` is set to true, a sticky collapsible table of contents bar will be shown on mobile viewports for guide and overview layout pages. */ + /** A sticky collapsible table of contents bar is shown on mobile viewports for guide and overview layout pages by default. Set `mobile-toc` to false to disable it. */ mobileToc?: boolean; } diff --git a/packages/cli/workspace/loader/src/docs-yml.schema.json b/packages/cli/workspace/loader/src/docs-yml.schema.json index 541bb9df61f9..e28ec64145be 100644 --- a/packages/cli/workspace/loader/src/docs-yml.schema.json +++ b/packages/cli/workspace/loader/src/docs-yml.schema.json @@ -6053,7 +6053,7 @@ "type": "null" } ], - "description": "If `mobile-toc` is set to true, a sticky collapsible table of contents bar will be shown on mobile viewports for guide and overview layout pages." + "description": "A sticky collapsible table of contents bar is shown on mobile viewports for guide and overview layout pages by default. Set `mobile-toc` to false to disable it." } }, "additionalProperties": false