Skip to content

Commit d2f8bfc

Browse files
authored
chore: document new docs.yml configs (#1219)
1 parent d36ea10 commit d2f8bfc

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

fern/products/docs/pages/customization/what-is-docs-yml.mdx

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ navbar-links:
8989
[`layout` configuration](/learn/docs/getting-started/global-configuration#layout-configuration).
9090
</ParamField>
9191

92+
<ParamField path="settings" type="object" required={false}>
93+
Customize the settings of your documentation website. Learn more about the
94+
[`settings` configuration](/learn/docs/getting-started/global-configuration#settings-configuration).
95+
</ParamField>
96+
9297
<ParamField path="landing-page" type="object" required={false}>
9398
Creates a landing page for your documentation website. Learn more about the
9499
[`landing-page` configuration](/learn/docs/getting-started/global-configuration#landing-page-configuration).
@@ -446,6 +451,51 @@ layout:
446451
If set to true, the feedback form will not be rendered. This can be overridden on a per-page basis using the [frontmatter](/learn/docs/configuration/page-level-settings#on-page-feedback).
447452
</ParamField>
448453

454+
## Settings configuration
455+
456+
```yaml docs.yml
457+
settings:
458+
search-text: "Search the docs..."
459+
disable-search: false
460+
dark-mode-code: true
461+
default-search-filters: true
462+
http-snippets: true
463+
hide-404-page: true
464+
use-javascript-as-typescript: false
465+
```
466+
467+
<ParamField path="settings.search-text" type="string" required={false} default="Search">
468+
The text to display in the searchbar.
469+
</ParamField>
470+
471+
<ParamField path="settings.disable-search" type="boolean" required={false}>
472+
If set to true, the searchbar will be disabled. Use this if you want to use a custom search solution.
473+
</ParamField>
474+
475+
<ParamField path="settings.dark-mode-code" type="boolean" required={false}>
476+
If set to true, the code blocks will be displayed in dark mode, regardless of the selected theme.
477+
</ParamField>
478+
479+
<ParamField path="settings.default-search-filters" type="boolean" required={false}>
480+
By default, search will display results for pages across all products and versions.
481+
482+
If set to true, search will display results for pages within the current product and version.
483+
</ParamField>
484+
485+
<ParamField path="settings.http-snippets" type="boolean" required={false}>
486+
If set to true, the HTTP snippets will be displayed in the API Reference.
487+
</ParamField>
488+
489+
<ParamField path="settings.hide-404-page" type="boolean" required={false}>
490+
If set to true, when a user navigates to a page that does not exist, they will be redirected to the home page.
491+
492+
By default, a 404 page will be displayed.
493+
</ParamField>
494+
495+
<ParamField path="settings.use-javascript-as-typescript" type="boolean" required={false}>
496+
If set to true, the TypeScript snippets will be displayed as JavaScript snippets in the API Reference.
497+
</ParamField>
498+
449499
## GitHub configuration
450500

451501
<Tabs>

fern/snippets/seo-metadata-site.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,9 @@ metadata:
8282
<ParamField path="metadata.twitter:card" type="string" required={false}>
8383
The Twitter Card type. Options are `summary`, `summary_large_image`, `app`, or `player`.
8484
</ParamField>
85+
86+
<ParamField path="metadata.canonical-host" type="string" required={false}>
87+
The host of your documentation website. This will be used to set the canonical URL for metadata tags and documents like the sitemap.
88+
89+
Defaults to the URL defined in the `instances` configuration.
90+
</ParamField>

0 commit comments

Comments
 (0)