Skip to content
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

(feat, docs): document local previews #3649

Merged
merged 1 commit into from
May 19, 2024
Merged
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
9 changes: 6 additions & 3 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,15 @@ navigation:
- page: Quickstart
slug: quickstart
path: ./pages/docs/introduction/quickstart.mdx
- page: Project Structure
slug: project-structure
path: ./pages/docs/introduction/project-structure.mdx
- page: Showcase
slug: showcase
path: ./pages/docs/introduction/showcase.mdx
- page: Local Development
slug: development
path: ./pages/docs/introduction/development.mdx
- page: Project Structure
slug: project-structure
path: ./pages/docs/introduction/project-structure.mdx
- section: Configuration
slug: config
contents:
Expand Down
2 changes: 1 addition & 1 deletion fern/fern.config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"organization": "fern",
"version": "0.24.0"
"version": "0.26.10"
}
70 changes: 70 additions & 0 deletions fern/pages/docs/introduction/development.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: 'Development'
excerpt: 'Preview changes before deploying to production'
---

## Local Development

<Info>
**Prerequisite**: Please install Node.js (version 18) before proceeding.
</Info>

The Fern CLI supports locally previewing your documentation and hot-reloading as you make changes. Follow the
steps below to setup your local development server.

<Steps>

### Intall the Fern CLI

<CodeGroup>
```bash npm
npm i -g fern-api
```
```bash yarn
yarn global add fern-api
```
</CodeGroup>

### Run `fern docs dev`

Navigate to your `fern` folder (where `docs.yml` is located) and execute the following command:

```bash
fern docs dev
```

A local preview of your documentation will be available at `http://localhost:3000`.

</Steps>

## Preview links

Preview links allow you to preview changes to your documentation in a live deployment. To generate
a preview link follow the steps below:

<Steps>

### Intall the Fern CLI

<CodeGroup>
```bash npm
npm i -g fern-api
```
```bash yarn
yarn global add fern-api
```
</CodeGroup>

### Run `fern generate --docs --preview`

Navigate to your `fern` folder (where `docs.yml` is located) and execute the following command:

```bash
fern generate --docs --preview
```

This will output a preview link which you can share with others.

</Steps>


Loading