diff --git a/.vale.ini b/.vale.ini index c6cca176e..dcc48728e 100644 --- a/.vale.ini +++ b/.vale.ini @@ -26,6 +26,7 @@ Microsoft.Ellipses = NO # Mostly just picks up code Microsoft.Dashes = NO Microsoft.Foreign = NO Microsoft.Plurals = NO +Microsoft.Quotes = NO # Mostly just picks up code # Not relevant for Fern audience Microsoft.GeneralURL = NO diff --git a/.vale/styles/FernStyles/Acronyms.yml b/.vale/styles/FernStyles/Acronyms.yml index 4884cbf90..578f1b6f2 100644 --- a/.vale/styles/FernStyles/Acronyms.yml +++ b/.vale/styles/FernStyles/Acronyms.yml @@ -84,3 +84,8 @@ exceptions: - RBAC - SAML - OIDC + - RGB + - JPEG + - RPG + - MIME + - PNG diff --git a/.vale/styles/FernStyles/Headings.yml b/.vale/styles/FernStyles/Headings.yml index 7eec73962..f365b9247 100644 --- a/.vale/styles/FernStyles/Headings.yml +++ b/.vale/styles/FernStyles/Headings.yml @@ -44,42 +44,6 @@ exceptions: - RPC - SDK - SDKs - - Accordion - - Accordions - - Accordion Groups - - Aside - - Badge - - Badges - - Button - - Callout - - Callouts - - Card - - Cards - - Card Groups - - Code Blocks - - CodeBlock - - CodeBlocks - - CodeGroup - - Embed - - Endpoint Request Snippet - - Endpoint Response Snippet - - Endpoint Schema Snippet - - Frame - - Frames - - Icon - - Icons - - Param Field - - Param Fields - - ParamField - - Runnable Endpoint - - Step - - Steps - - Sticky Table - - StickyTable - - Tab - - Tabs - - Tooltip - - Tooltips - PDF - CSS - HTML @@ -114,3 +78,4 @@ exceptions: - RBAC - YAML - fern.config.json + - Font Awesome diff --git a/fern/assets/styles.css b/fern/assets/styles.css index 66852b0f7..cd4e7ffd8 100644 --- a/fern/assets/styles.css +++ b/fern/assets/styles.css @@ -1107,3 +1107,24 @@ h1, h2, h3 { .fern-sidebar-link[href$="changelog"] > svg { display: none; } + +/*** START -- HIGHLIGHTED FRAME STYLING ***/ +.highlight-frame { + background-color: var(--accent-a2); + border-radius: 0.75rem; + padding: 1.5rem; + margin: 1rem 0; +} + +.highlight-frame > *:first-child { + margin-top: 0; +} + +.highlight-frame > *:last-child { + margin-bottom: 0; +} + +:is(.dark) .highlight-frame { + background-color: var(--accent-a3); +} +/*** END -- HIGHLIGHTED FRAME STYLING ***/ diff --git a/fern/docs.yml b/fern/docs.yml index 48bfbc35d..c6e6601f4 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -304,6 +304,10 @@ redirects: destination: /learn/docs/preview-publish/publishing-your-docs # Building and Customizing Your Docs redirects - specific cases first + - source: /learn/docs/writing-content/components/accordion-groups + destination: /learn/docs/writing-content/components/accordions + - source: /learn/docs/writing-content/components/card-groups + destination: /learn/docs/writing-content/components/cards - source: /learn/docs/building-and-customizing-your-docs/navigation destination: /learn/docs/configuration/navigation - source: /learn/docs/navigation/overview diff --git a/fern/products/docs/docs.yml b/fern/products/docs/docs.yml index dc898fec9..c46be377c 100644 --- a/fern/products/docs/docs.yml +++ b/fern/products/docs/docs.yml @@ -35,75 +35,81 @@ navigation: - page: Overview path: ./pages/component-library/default-components/overview.mdx icon: fa-duotone fa-book - - page: Accordions + - page: Accordion path: ./pages/component-library/default-components/accordions.mdx icon: fa-duotone fa-chevron-down - - page: Accordion Groups - path: ./pages/component-library/default-components/accordion-groups.mdx - icon: fa-duotone fa-chevrons-down + slug: accordions - page: Anchor path: ./pages/component-library/default-components/anchor.mdx icon: fa-duotone fa-link - page: Aside path: ./pages/component-library/default-components/aside.mdx icon: fa-regular fa-comment-dots - - page: Badges + - page: Badge path: ./pages/component-library/default-components/badges.mdx icon: fa-regular fa-ribbon + slug: badges - page: Button path: ./pages/component-library/default-components/button.mdx icon: fa-duotone fa-arrow-pointer - - page: Callouts + - page: Callout path: ./pages/component-library/default-components/callouts.mdx icon: fa-duotone fa-exclamation-triangle - - page: Cards + slug: callouts + - page: Card path: ./pages/component-library/default-components/cards.mdx icon: fa-duotone fa-id-card - - page: Card Groups - path: ./pages/component-library/default-components/card-groups.mdx - icon: fa-duotone fa-grid-2 - - page: Code Blocks + slug: cards + - page: Code block path: ./pages/component-library/default-components/code-blocks.mdx icon: fa-duotone fa-code + slug: code-blocks - page: Embed path: ./pages/component-library/default-components/embed.mdx icon: fa-duotone fa-window-restore - - page: Endpoint Request Snippet + - page: Endpoint request snippet path: ./pages/component-library/default-components/endpoint-request-snippet.mdx icon: fa-duotone fa-arrow-up slug: request-snippet - - page: Endpoint Response Snippet + - page: Endpoint response snippet path: ./pages/component-library/default-components/endpoint-response-snippet.mdx icon: fa-duotone fa-arrow-down slug: response-snippet - - page: Endpoint Schema Snippet + - page: Endpoint schema snippet path: ./pages/component-library/default-components/endpoint-schema-snippet.mdx icon: fa-duotone fa-sitemap slug: schema-snippet - - page: Runnable Endpoint - path: ./pages/component-library/default-components/runnable-endpoint.mdx - icon: fa-duotone fa-play-circle - - page: Frames + - page: Frame path: ./pages/component-library/default-components/frames.mdx icon: fa-duotone fa-window-maximize - - page: Icons + slug: frames + - page: Icon path: ./pages/component-library/default-components/icons.mdx icon: fa-duotone fa-icons - - page: Parameter Fields + slug: icons + - page: Parameter field path: ./pages/component-library/default-components/parameter-fields.mdx icon: fa-duotone fa-list - - page: Steps + slug: parameter-fields + - page: Runnable endpoint + path: ./pages/component-library/default-components/runnable-endpoint.mdx + icon: fa-duotone fa-play-circle + - page: Step path: ./pages/component-library/default-components/steps.mdx icon: fa-duotone fa-list-ol - - page: Sticky tables + slug: steps + - page: Sticky table path: ./pages/component-library/default-components/sticky-tables.mdx icon: fa-duotone fa-table - - page: Tabs + slug: sticky-tables + - page: Tab path: ./pages/component-library/default-components/tabs.mdx icon: fa-duotone fa-folder-open - - page: Tooltips + slug: tabs + - page: Tooltip path: ./pages/component-library/default-components/tooltips.mdx icon: fa-duotone fa-comment + slug: tooltips - page: Fern Editor path: ./pages/component-library/writing-content/visual-editor.mdx slug: fern-editor diff --git a/fern/products/docs/pages/component-library/default-components/accordion-groups.mdx b/fern/products/docs/pages/component-library/default-components/accordion-groups.mdx deleted file mode 100644 index 407fe37f9..000000000 --- a/fern/products/docs/pages/component-library/default-components/accordion-groups.mdx +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: Accordion Groups -description: Display expandable/collapsible options that reveal more information with improved search functionality ---- - -Accordion Groups allow you to organize content into collapsible sections, making it easier for users to navigate through information. With recent updates, our Accordion component now supports improved search functionality using the browser's built-in search feature. - - - - Accordion Groups can contain multiple Accordion items. Each Accordion has a title and content that can be expanded or collapsed. You can use the `defaultOpen` prop to expand specific accordions by default when the page loads. - - ```jsx - - - Content for section 1, expanded by default - - - Content for section 2 - - - ``` - - - - Accordion components use HTML5 `
` and `` elements, enabling browser search (Cmd+F / Ctrl+F) so users can find content within collapsed sections. - - - - - The Accordion component supports keyboard navigation and screen readers. - - - - -## Usage examples - - - - - - This is a basic example with text content. It's open by default when the page loads. - - - You can embed images, videos, and other media within accordions for rich interactive content. - - - A sample image - - - - Accordions can contain other components, such as code blocks and callouts. - - ```ts - export function greet(name: string) { - return `Hello, ${name}!`; - } - ``` - - - Here's a nested callout. - - - - - - - - - ````jsx - - - This is a basic example with text content. It's open by default when the page loads. - - - You can embed images, videos, and other media within accordions for rich interactive content. - - - A sample image - - - - Accordions can contain other components, such as code blocks and callouts. - - ```ts - export function greet(name: string) { - return `Hello, ${name}!`; - } - ``` - - - Here's a nested callout. - - - - - ```` - - - diff --git a/fern/products/docs/pages/component-library/default-components/accordions.mdx b/fern/products/docs/pages/component-library/default-components/accordions.mdx index f41afd63d..78ceed92c 100644 --- a/fern/products/docs/pages/component-library/default-components/accordions.mdx +++ b/fern/products/docs/pages/component-library/default-components/accordions.mdx @@ -1,31 +1,89 @@ --- -title: 'Accordions' -description: 'Expand or collapse to reveal more information' +title: Accordion +description: Display expandable/collapsible options with browser search functionality --- -The Accordion component allows you to create expandable sections in your documentation. Content within accordions is searchable using browser search (cmd+f) even when collapsed. The component is optimized for SEO with server-side HTML generation, ensuring search engines can properly index all content within accordions. - - - - - This is an example of an accordion component. When clicked, it expands to reveal this additional content. - - - You can use the `defaultOpen` property to have specific accordions expanded by default when the page loads. This is useful for highlighting important information or frequently accessed content. - - - - ```jsx - - This is an example of an accordion component. When clicked, it expands to reveal this additional content. - - - - You can use the `defaultOpen` property to have specific accordions expanded by default when the page loads. This is useful for highlighting important information or frequently accessed content. - - ``` - - +The `` component creates expandable sections with searchable, SEO-friendly content that remains accessible even when collapsed. Use accordions for FAQs, documentation sections, settings panels, or any content where progressive disclosure improves readability. + +You can use single accordions or group multiple accordions together with ``. + +## Usage + +
+ + + Content for section 1, expanded by default + + + Content for section 2 + + +
+ +```jsx Markdown + + + Content for section 1, expanded by default + + + Content for section 2 + + +``` + +## Variants + +Within each accordion, you can embed images, videos, and other components (callouts, code blocks, etc) within accordions for rich interactive content. + +### Multimedia + +
+ + + A sample image + + +
+ +```jsx Markdown + + + A sample image + + +``` + +### Nested components + +
+ + + Here's a callout nested in an accordion + + +
+ +```jsx Markdown + + + Here's a callout nested in an accordion + + +``` + +### Default open + +
+ + Use the `defaultOpen` property to have specific accordions expanded by default when the page loads. This is useful for highlighting important information or frequently accessed content. + +
+ +```jsx Markdown + + Use the `defaultOpen` property to have specific accordions expanded by default when the page loads. This is useful for highlighting important information or frequently accessed content. + +``` ## Properties @@ -41,4 +99,3 @@ The Accordion component allows you to create expandable sections in your documen Whether the accordion should be open when the page loads. If not specified, the accordion will be collapsed by default. - diff --git a/fern/products/docs/pages/component-library/default-components/anchor.mdx b/fern/products/docs/pages/component-library/default-components/anchor.mdx index b38f5a678..32a43f6ff 100644 --- a/fern/products/docs/pages/component-library/default-components/anchor.mdx +++ b/fern/products/docs/pages/component-library/default-components/anchor.mdx @@ -3,94 +3,89 @@ title: Anchor description: Create linkable anchors for paragraphs, tables, and other content without headings --- -Use the `` component to create links to specific paragraphs, tables, and other sections of content that don't have headings. Wrap your content with the `` tag and assign it a custom anchor ID, which you can link to in URLs using the hash symbol (example: `https://website.com/page#data`). +The `` component creates direct links to specific content like paragraphs, tables, and code blocks. Use anchors when you need to reference non-heading content that doesn't automatically generate its own link. - Headings automatically generate anchor links based on their text content, so you don't need to use the `` component for headings. + Headings automatically generate anchor links based on their text content, so you don't need to use the anchor component for headings. - - +## Usage -This sentence has a custom anchor +Wrap your content with the `` tag and assign it a custom anchor ID, which you can link to in URLs using the hash symbol (example: `https://website.com/page#data`). -You can link to it using `#data` in the URL. - - +
+This sentence has a custom anchor named `#data`. You can access it via this URL: https://buildwithfern.com/learn/docs/writing-content/components/anchor#data. +
-```jsx -This sentence has a custom anchor - -You can link to it using `#data` in the URL. +```jsx Markdown +This sentence has a custom anchor named `#data`. You can access it via this URL: https://buildwithfern.com/learn/docs/writing-content/components/anchor#data. ``` -
-
- - - +## Variants -| Endpoint | Method | Description | -|----------|--------|-------------| -| `/users` | GET | Retrieve all users | -| `/users/:id` | GET | Retrieve a specific user | -| `/users` | POST | Create a new user | +### Anchor a table - +
+ + + | Endpoint | Method | Description | + |----------|--------|-------------| + | `/plants` | GET | Retrieve all plants | + | `/plants/:id` | GET | Retrieve a specific plant | + | `/plants` | POST | Create a new plant | + + You can link directly to the [API endpoints table](#api-endpoints). - - +
-```jsx +```jsx Markdown | Endpoint | Method | Description | |----------|--------|-------------| -| `/users` | GET | Retrieve all users | -| `/users/:id` | GET | Retrieve a specific user | -| `/users` | POST | Create a new user | +| `/plants` | GET | Retrieve all plants | +| `/plants/:id` | GET | Retrieve a specific plant | +| `/plants` | POST | Create a new plant | You can link directly to the [API endpoints table](#api-endpoints). ``` -
-
- - - - -```python -def authenticate(api_key): - """Authenticate using your API key""" - headers = {"Authorization": f"Bearer {api_key}"} - return requests.get("https://api.example.com/auth", headers=headers) -``` +### Anchor a code block - +
+ -Reference the [authentication code example](#example-code) in your implementation. - - + ```python + def water_plant(plant_id, amount): + """Water a plant with specified amount""" + headers = {"Authorization": f"Bearer {api_key}"} + return requests.post(f"https://api.example.com/plants/{plant_id}/water", + json={"amount": amount}, + headers=headers) + ``` +Reference the [watering code example](#example-code) in your implementation. + +
-````jsx +````jsx Markdown ```python -def authenticate(api_key): - """Authenticate using your API key""" +def water_plant(plant_id, amount): + """Water a plant with specified amount""" headers = {"Authorization": f"Bearer {api_key}"} - return requests.get("https://api.example.com/auth", headers=headers) + return requests.post(f"https://api.example.com/plants/{plant_id}/water", + json={"amount": amount}, + headers=headers) ``` -Reference the [authentication code example](#example-code) in your implementation. +Reference the [watering code example](#example-code) in your implementation. ```` -
-
## Properties diff --git a/fern/products/docs/pages/component-library/default-components/aside.mdx b/fern/products/docs/pages/component-library/default-components/aside.mdx index d84f16417..581ecab25 100644 --- a/fern/products/docs/pages/component-library/default-components/aside.mdx +++ b/fern/products/docs/pages/component-library/default-components/aside.mdx @@ -3,16 +3,16 @@ title: 'Aside' description: 'Push any content inside the Aside component to the right of the page in a sticky container' --- -The Aside component creates a sticky container that floats content to the right of your page. Use it to showcase code examples, API snippets, or any supplementary content that should stay visible as users scroll. +The `