Skip to content

Commit 55afe69

Browse files
authored
(docs) Expand references to custom CSS/JS page, add a common use cases section for JS (#881)
1 parent 86391bc commit 55afe69

File tree

7 files changed

+19
-3
lines changed

7 files changed

+19
-3
lines changed

fern/products/docs/pages/component-library/custom-components/custom-css-js.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Custom CSS & JS are available on the Basic plan.
99
Adding Custom Components is available on the Pro plan.
1010
</Note>
1111

12+
This page covers how to customize your docs with CSS, JavaScript, and custom components. However, you can [customize many things directly in your `docs.yml` file](/docs/configuration/what-is-docs-yml), including colors, typography, navbar links, layout, analytics, and metadata. Try these built-in options first before adding custom code.
13+
1214
## Custom CSS
1315

1416
You can add custom CSS to your docs to further customize the look and feel. The defined class names are applied across all MDX files.
@@ -194,6 +196,12 @@ js:
194196
```
195197
</CodeBlock>
196198

199+
### Common use cases
200+
201+
- Integrate with [third-party platforms](/docs/integrations/overview) that Fern doesn't natively support
202+
- Implement custom search (also requires [your Algolia credentials](/docs/customization/search))
203+
- Insert scripts and widgets
204+
197205
## Custom components
198206

199207
You can use custom CSS and JS to replace Fern's default UI components with your own. The `header` and `footer`

fern/products/docs/pages/component-library/default-components/overview.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ This will automatically render a card with the title, icon, and content you spec
3434

3535
Want to bring your own UI components, such as a custom header and footer? You can on the Enterprise plan. [Contact us](https://buildwithfern.com/contact) to learn more.
3636

37+
For styling and functionality customizations, see [Custom CSS & JavaScript](/docs/customization/custom-css-js).
38+
3739
## Requests for new components
3840

3941
Have a component in mind that you'd like to see in Fern? Let us know by filing a [GitHub Issue](https://github.com/fern-api/fern/issues/new?assignees=&labels=&projects=&template=feature-request.md&title=%5BFeature%5D).

fern/products/docs/pages/customization/frontmatter.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ subtitle: Set titles, add meta descriptions, and more
44
description: Use frontmatter to set a variety of page properties and metadata.
55
---
66

7-
You can optionally use frontmatter to set each page's title, full 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 and on-page feedback.
7+
You can optionally use frontmatter to set each page's title, full 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 and on-page feedback. For advanced styling and functionality customizations beyond frontmatter options, see [custom CSS and JavaScript](/docs/customization/custom-css-js).
88

99
Frontmatter must be added to the top of a `.md` or `.mdx` file, before the rest of the content. Use sets of three dashes to indicate the beginning and end of your frontmatter, as shown:
1010

fern/products/docs/pages/customization/search.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ Contact the Fern team to get your specific application ID and index name. Creden
4242

4343
## Using an alternative search
4444

45-
You can override Fern's search with your own solution. To learn more, see [Custom JavaScript](/learn/docs/building-and-customizing-your-docs/custom-css-global-js#custom-javascript).
45+
You can override Fern's search with your own solution using [custom JavaScript](/learn/docs/building-and-customizing-your-docs/custom-css-global-js#custom-javascript) and your Algolia credentials.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ subtitle: "Customize your documentation using the docs.yml file"
44
description: "Learn how to configure your Fern documentation site with the docs.yml file. Customize colors, typography, layout, analytics and more."
55
---
66

7+
The `docs.yml` file is your primary tool for customizing your documentation site, including colors, typography, layout, analytics, and more. Start here for most customization needs before considering [custom CSS and JavaScript](/docs/customization/custom-css-js) for advanced use cases.
8+
79
### YAML Schema Validation
810

911
To enable intelligent YAML validation and autocompletion in your editor, add this line at the top of your `docs.yml` file:

fern/products/docs/pages/integrations/overview.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,7 @@ are available during the workflow run.
9494
The Postman integration is not configured in `docs.yml`. Check out this [page](/learn/docs/integrations/postman) to
9595
learn more.
9696
</Info>
97+
98+
## Connect other integrations
99+
100+
If you want to integrate with a third-party analytics or support platforms that Fern doesn't directly support, you can do so [using custom JS](/docs/customization/custom-css-js#custom-javascript).

fern/products/docs/pages/navigation/announcement-banner.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ announcement:
1010
message: "🚀 New feature: Announcements are available! (<a href=\"https://buildwithfern.com/learn/docs/building-your-docs/announcements\" target=\"_blank\">Learn more</a>) 🚀"
1111
```
1212
13-
Markdown and HTML is supported in the announcement message. You can include links, images, and other formatting. [Custom CSS](/learn/docs/building-your-docs/custom-css-global-js#custom-css) can be used to customize the style of the announcement.
13+
Markdown and HTML is supported in the announcement message. You can include links, images, and other formatting. [Custom CSS](/docs/customization/custom-css-js#custom-css) can be used to customize the style of the announcement.

0 commit comments

Comments
 (0)