Skip to content

Commit 50c16c3

Browse files
authored
fix: make small organizational changes to library docs (#5815)
1 parent dd52c16 commit 50c16c3

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

fern/products/docs/pages/api-references/library-docs.mdx

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Cross-links are automatic. When a fully qualified identifier appears in a code b
1515

1616
Add a `libraries` entry to your `docs.yml` file. Each library needs an `input` source, an `output.path` (where generated MDX files are written), and a `lang` (`python` or `cpp`).
1717

18-
The input source can be a `git` URL (parsed remotely on Fern's servers) or a local `path` (parsed locally with the [`--local` flag](#local-generation)).
18+
The input source can be a `git` URL, parsed remotely on Fern's servers, or a local `path`, parsed on your machine with the `--local` flag. Local parsing is useful for iterating on documentation without pushing to a remote repository, and doesn't require you to be logged in to Fern.
1919

2020
<Tabs>
2121
<Tab title="git input (remote)">
@@ -72,22 +72,33 @@ navigation:
7272

7373
Run the [`fern docs md generate`](/learn/cli-api-reference/cli-reference/commands#fern-docs-md-generate) command to generate MDX files from your library source code:
7474

75+
<Tabs>
76+
<Tab title="git input (remote)">
7577
```bash
7678
fern docs md generate
7779
```
7880

79-
For `git` inputs, the command sends the repository URL to Fern's servers for parsing. For `path` inputs, pass `--local` to parse the source locally:
80-
81+
The command sends the repository URL to Fern's servers for parsing.
82+
</Tab>
83+
<Tab title="path input (local)">
8184
```bash
8285
fern docs md generate --local
8386
```
8487

85-
Local generation doesn't require authentication.
88+
The `--local` flag parses the source on your machine instead of on Fern's servers.
89+
90+
<Note>
91+
For C++ libraries, the parser uses your `path` directory as the source root. If your Doxyfile sets its input directive to subdirectories, the effective scope is your `path` combined with those Doxyfile input entries. Ensure the Doxyfile's input paths are relative to the root of your `path` directory.
92+
</Note>
93+
</Tab>
94+
</Tabs>
8695

8796
<Tip>
8897
If you have multiple libraries configured, `fern docs md generate` processes all libraries in parallel. Use `--library plant-sdk` to generate docs for a specific library only.
8998
</Tip>
9099

100+
The generated docs form a navigation section with pages for each module, class, function, and type in your library.
101+
91102
</Step>
92103
<Step title="Preview locally">
93104

@@ -97,14 +108,12 @@ Run the local development server to see your library docs alongside the rest of
97108
fern docs dev
98109
```
99110

100-
You can also generate a preview URL to share with your team:
111+
You can also generate a shareable preview URL:
101112

102113
```bash
103114
fern generate --docs --preview
104115
```
105116

106-
The library docs appear as a navigation section with pages for each module, class, function, and type in your library.
107-
108117
</Step>
109118
<Step title="Publish">
110119

@@ -164,14 +173,6 @@ For example, splitting `./static/plant-sdk-docs` into `getting-started/` and `re
164173

165174
You can also edit page content by modifying the MDX files directly — generated pages are [standard MDX](/learn/docs/writing-content/markdown-basics), so you can add prose, examples, callouts, or any [component](/learn/docs/writing-content/components/overview). Re-running `fern docs md generate` overwrites everything in `output.path`, so commit your customizations first, and keep hand-edited pages outside the output directory if you plan to regenerate.
166175

167-
## Local generation
168-
169-
The `--local` flag parses library source locally instead of on Fern's servers. This is useful for iterating on documentation without pushing to a remote repository.
170-
171-
<Note>
172-
For C++ libraries, the parser uses your `path` directory as the source root. If your Doxyfile sets its input directive to subdirectories, the effective scope is your `path` combined with those Doxyfile input entries. Ensure the Doxyfile's input paths are relative to the root of your `path` directory.
173-
</Note>
174-
175176
## Configuration reference
176177

177178
<ParamField path="input.git" type="string">

0 commit comments

Comments
 (0)