Skip to content

🌿 Fern Scribe: Add docs for collapsed:true for docs.yml... #318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 1, 2025

🌿 Fern Scribe Documentation Update

Original Request: Add docs for collapsed:true for docs.yml

Files Updated:

  • fern/products/docs/pages/navigation/overview.mdx

Priority: Medium

Related Discussion: https://buildwithfern.slack.com/archives/C08801YNZG9/p1749740586553209

Additional Context: No response

⚠️ Files with MDX Validation Issues

The following files could not be updated due to MDX validation failures after 3 attempts:

1. /learn/docs/writing-content/components/accordions (Accordions)

Suggested Content (needs manual MDX fixes):

---
title: 'Accordions'
description: 'Expand or collapse to reveal more information'
---

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.

## Properties

<ParamField path="title" type="string" required={true}>
  The title shown in the accordion header
</ParamField>

<ParamField path="children" type="string | JSX" required={true}>
  The content to be displayed when the accordion is expanded. Can include text, markdown, and components.
</ParamField>

<ParamField path="collapsed" type="boolean" required={false}>
  When set to `true` in your `docs.yml` file, the accordion will be collapsed by default. This property can be applied to any level of header section.
</ParamField>

<br />

<Tabs>
  <Tab title="Example">
      <Accordion title='Single Accordion'>
        This is an example of an accordion component. When clicked, it expands to reveal this additional content. 
      </Accordion>
  </Tab>
  <Tab title="Markdown">
    ```jsx
    <Accordion title='Single Accordion'>
      This is an example of an accordion component. When clicked, it expands to reveal this additional content.
    </Accordion>
    ```
  </Tab>
  <Tab title="docs.yml">
    ```yaml
    sidebar:
      - title: Introduction
        collapsed: true
        items:
          - page: introduction/overview
          - page: introduction/quickstart
    ```
  </Tab>
</Tabs>

2. /learn/docs/navigation/changelogs (Changelogs)

Suggested Content (needs manual MDX fixes):

---
title: Keep a Changelog
subtitle: Record the notable changes to your project
---

Keep a record of how your project has changed by writing changelog entries. The changelog will automatically populate with the files contained within the `changelog` folder.

<Frame
    caption="Keep your users updated as your project evolves"
    background="subtle"
>
    <img src="changelog-humanloop.png" />
</Frame>

## Configure your Changelog

<AccordionGroup>
<Accordion title='Top-level Changelog'>
Configure a changelog for your project by creating a changelog folder.

<CodeBlock title="Configure a Changelog">
```yaml {4-6}
fern/
├─ fern.config.json
├─ docs.yml
├─ changelog/
    ├─ 07-08-24.md
    └─ 08-21-24.mdx

Once you've configured your changelog, specify where it should appear within your docs in your docs.yml.

```yaml {8-11,17} tabs: guides: display-name: Guides icon: light book-open api: display-name: API Reference icon: light code changelog: display-name: Changelog icon: light clock changelog: ./changelog

navigation:

  • tab: guides
    layout:
    ...
  • tab: changelog
</CodeBlock>

[View an example](https://github.com/elevenlabs/elevenlabs-docs/blob/ab509a12b1c7e3db37b6414a76b502e71b580feb/fern/docs.yml#L45-L47) in GitHub of the ElevenLabs `docs.yml` which powers [their Changelog](https://elevenlabs.io/docs/changelog).

</Accordion>
<Accordion title="Section-level Changelog">
Configure a changelog for your project by creating a changelog folder.

<CodeBlock title="Configure a Changelog">
```yaml {4-6}
fern/
├─ fern.config.json
├─ docs.yml
├─ pages/
├─ changelog/
    ├─ 07-08-24.md
    └─ 08-21-24.mdx

Once you've configured your changelog, specify where it should appear within your navigation in your docs.yml.

```yaml {9-11} navigation: - section: Introduction contents: - page: Authentication path: ./pages/authentication.mdx - page: Versioning path: ./pages/versioning.mdx - api: API Reference - changelog: ./changelog title: Release Notes slug: api-release-notes ``` Section-level changelogs **cannot** be nested within an `api` entry. See [API-level changelogs](#api-level-changelog) to add an API-level entry.

Navigation Options

Collapsed Sections

You can configure sections to be collapsed by default using the collapsed property in your docs.yml. This is useful for organizing large documentation sets with many sections.

```yaml navigation: - section: React collapsed: true contents: - page: Overview path: ./pages/react/overview.mdx - page: Installation path: ./pages/react/installation.mdx ```

The collapsed property can be applied to any section in your navigation. When set to true, the section will be collapsed by default when users first load the documentation. Users can still expand the section by clicking on it.

Create a Changelog Overview

You can include a high-level overview at the top of your changelog by adding an overview.mdx file to your changelog folder.

This is useful for summarizing major themes, linking to external release notes, or giving users context before diving into specific entries.

If an overview.mdx file is present, it will appear above the list of changelog entries automatically—no additional configuration needed.

Write a Changelog Entry

Create a new changelog entry by writing a Markdown file. You can use .md or .mdx files. The benefit of using .mdx is that you can leverage the built-in component library within an entry.

```mdx ## Summary

In the latest release, we've added endpoints to create a new Plant.

What's new?

New endpoints:

... [Content truncated due to length]


**Note**: These files require manual review and correction of their MDX component structure before the content can be applied.

---
*This PR was automatically generated by Fern Scribe based on issue #317*

**Please review the changes carefully before merging.**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants