Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions fern/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# NeMo Automodel Fern Documentation

This folder contains the Fern Docs configuration for NeMo Automodel.

## Installation

```bash
npm install -g fern-api
# Or: npx fern-api --version
```

## Local Preview

```bash
cd fern/
fern docs dev
# Or from project root: fern docs dev --project ./fern
```

Docs available at `http://localhost:3000`.

## Folder Structure

```
fern/
├── docs.yml # Global config (title, colors, versions)
├── fern.config.json # Fern CLI config
├── versions/
│ └── v0.1.0.yml # Navigation for v0.1.0
├── v0.1.0/
│ └── pages/ # MDX content for v0.1.0
├── scripts/ # Migration and conversion scripts
└── assets/ # Favicon, images
```

## Migration Workflow

To migrate or update docs from `docs/` to Fern:

```bash
# 1. Copy docs to fern (run from repo root)
python3 fern/scripts/copy_docs_to_fern.py v0.1.0

# 2. Expand {include} directives (index)
python3 fern/scripts/expand_includes.py fern/v0.1.0/pages

# 3. Convert Automodel-specific syntax (if any)
python3 fern/scripts/convert_automodel_specific.py fern/v0.1.0/pages

# 4. Convert MyST to Fern MDX
python3 fern/scripts/convert_myst_to_fern.py fern/v0.1.0/pages

# 5. Add frontmatter
python3 fern/scripts/add_frontmatter.py fern/v0.1.0/pages

# 6. Update internal links
python3 fern/scripts/update_links.py fern/v0.1.0/pages

# 7. Remove duplicate H1s (when title matches frontmatter)
python3 fern/scripts/remove_duplicate_h1.py fern/v0.1.0/pages

# 8. Validate
./fern/scripts/check_unconverted.sh fern/v0.1.0/pages
```

## MDX Components

```mdx
<Note>Informational note</Note>
<Tip>Helpful tip</Tip>
<Warning>Warning message</Warning>
<Info>Info callout</Info>

<Cards>
<Card title="Title" href="/path">Description</Card>
</Cards>

<Tabs>
<Tab title="Python">```python\ncode\n```</Tab>
</Tabs>

<Accordion title="Details">Collapsible content</Accordion>
```

## API Reference

API docs are built by Sphinx (autodoc2) and hosted at docs.nvidia.com. The "API Reference" link in the navbar points to `https://docs.nvidia.com/nemo/automodel/latest/apidocs/`.

## Deploying

```bash
fern generate --docs
fern docs deploy
```

## Useful Links

- [Fern Docs](https://buildwithfern.com/learn/docs)
- [MDX Components](https://buildwithfern.com/learn/docs/components)
- [Versioning Guide](https://buildwithfern.com/learn/docs/configuration/versions)
35 changes: 35 additions & 0 deletions fern/assets/NVIDIA_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions fern/assets/NVIDIA_light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions fern/assets/NVIDIA_symbol.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading