You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(fern): inject local library entry at generate time instead of committing it
A committed path-input library entry breaks 'fern docs dev' and
'fern generate --docs': the docs config parser rejects any
'input.path' library ("'path' input which is not yet supported.
Please use 'git' input.") and renders a blank page. Meanwhile
'fern docs md generate --local' only accepts path inputs, so the
entry can't live in docs.yml at all.
Move the nemo-curator-local entry out of docs.yml and into
scripts/generate-library-local.sh, which injects it temporarily,
runs the local generation, and restores docs.yml on exit. The npm
script and Makefile target now call the script; CI flows are
unchanged.
Verified in the fern-api/fern source and npm bundles that the parser
throw exists in 5.50.4 (our pin) and 5.65.5 (latest), and that
'fern check' does not catch it — only 'docs dev'/builds fail.
Signed-off-by: Lawrence Lane <llane@nvidia.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/skills/nemo-curator-docs/SKILL.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -320,10 +320,10 @@ This is a temporary maneuver — track the change so it gets reverted.
320
320
321
321
## Library Reference (Autodocs) and the Fern Cross-Ref Bug
322
322
323
-
`fern/docs.yml` declares two`libraries:`entries that write to the same output folder (`fern/product-docs/nemo-curator/Full-Library-Reference/`, gitignored):
323
+
`fern/docs.yml` declares one`libraries:`entry, and a script provides a second, temporary one (both write to `fern/product-docs/nemo-curator/Full-Library-Reference/`, gitignored):
324
324
325
-
-**`nemo-curator`** (`input.git`) — used by CI/publish/preview; requires `fern login` or `FERN_TOKEN`. Workflows run `fern docs md generate --library nemo-curator`.
326
-
-**`nemo-curator-local`** (`input.path: ../nemo_curator`) — local dev without Fern auth; requires Docker. Run `npm run generate:library:local` from `fern/`.
325
+
-**`nemo-curator`** (`input.git`, committed in `docs.yml`) — used by CI/publish/preview; requires `fern login` or `FERN_TOKEN`. Workflows run `fern docs md generate --library nemo-curator`.
326
+
-**`nemo-curator-local`** (`input.path: ../nemo_curator`, injected temporarily by `fern/scripts/generate-library-local.sh`) — local dev without Fern auth; requires Docker. Run `npm run generate:library:local` from `fern/`. The entry must NOT be committed to `docs.yml`: `fern docs dev` rejects path-input libraries ("'path' input which is not yet supported") and renders a blank page, while `--local` generation only accepts `path` inputs.
327
327
328
328
For a full API reference locally (424 pages), use `npm run generate:library`. The local Docker parser is beta and currently produces fewer pages — fine for testing the no-auth flow, not a substitute for CI generation.
npm run generate:library:local # runs scripts/generate-library-local.sh
96
96
```
97
97
98
+
The script temporarily injects a path-input `nemo-curator-local` entry into `docs.yml`, runs `fern docs md generate --local`, and restores `docs.yml`. The entry cannot be committed: `fern docs dev`rejects any `input.path` library and renders a blank page, while `--local` generation only accepts `path` inputs.
99
+
98
100
Fern will generate markdown under the output path you configured, for example:
Copy file name to clipboardExpand all lines: fern/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,14 +99,13 @@ For prose-only iteration, `fern docs dev` is enough. Library reference (`product
99
99
100
100
### Library reference without Fern login
101
101
102
-
CI and deploy previews use the `nemo-curator` library (`input.git`) and require `fern login` or `FERN_TOKEN`. For local iteration on the Python API reference without Fern authentication, use the `nemo-curator-local` entry (`input.path`) with Docker:
102
+
CI and deploy previews use the `nemo-curator` library (`input.git`) and require `fern login` or `FERN_TOKEN`. For local iteration on the Python API reference without Fern authentication, run:
npm run generate:library:local # runs scripts/generate-library-local.sh; requires Docker
107
106
```
108
107
109
-
Both libraries write to the same output folder (`product-docs/nemo-curator/Full-Library-Reference`), so previews and publish keep working unchanged. Requires Docker (Fern pulls `fernapi/fern-python-library-docs-parser` on first run).
108
+
The script temporarily injects a path-input `nemo-curator-local` entry into `docs.yml`, runs `fern docs md generate --local --library nemo-curator-local`, and restores `docs.yml` afterward. The entry can't live in the committed `docs.yml`: `fern docs dev` and `fern generate --docs` reject any `input.path` library ("'path' input which is not yet supported") and render a blank page, while `--local` generation only accepts `path` inputs. Both flows write to the same output folder (`product-docs/nemo-curator/Full-Library-Reference`), so previews and publish keep working unchanged. Requires Docker (Fern pulls `fernapi/fern-python-library-docs-parser` on first run).
|`HTTP 403: User does not belong to organization` on library generation | Sign in to https://dashboard.buildwithfern.com first, then re-run `fern login`. Or use `npm run generate:library:local` (no Fern auth; requires Docker). |
223
-
|`Folder not found: ./product-docs/...` in `fern docs dev`| Library generation hasn't run; trigger a `fern docs dev` cycle or check the `libraries:` block in `docs.yml`|
222
+
|`Folder not found: ./product-docs/...` in `fern docs dev`| Library generation hasn't run; run `npm run generate:library` (or `generate:library:local`) first |
223
+
|`Library '...' uses 'path' input which is not yet supported` + blank page in `fern docs dev`| A path-input library entry is committed in `docs.yml` — remove it; local generation injects it temporarily via `scripts/generate-library-local.sh`|
224
224
|`fern check` YAML error | 2-space indent; `- page:` inside `contents:`; `path:` is relative to the version YAML |
225
225
| Page 404 in preview |`slug:` missing/duplicated in the same section, or `position:` collision in an auto-discovered folder |
226
226
| Broken-link warning for cross-version path | False positive in `fern docs dev`; the published site resolves it correctly |
0 commit comments