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
Create beautiful documentation in under 5 minutes using your OpenAPI specification.
16
16
17
17
</div>
18
18
19
-
## Customer Showcase
19
+
## Customer showcase
20
20
21
21
Get inspired by API documentation built with Fern: [Webflow](https://developers.webflow.com) | [You.com](https://you.com/docs) | [Cohere](https://docs.cohere.com) | [ElevenLabs](https://elevenlabs.io/docs)
22
22
@@ -28,142 +28,59 @@ Get inspired by API documentation built with Fern: [Webflow](https://developers.
28
28
- A [GitHub](https://github.com) account
29
29
- Knowledge of the command line
30
30
31
-
### Step 1: Use this template
31
+
##Getting started
32
32
33
-
1. Click on the **Use this template** button (found at the top right of this page). You must be logged into GitHub.
34
-
2. Choose the option to **create a new repository**. Name it `fern-docs`.
35
-
3. Install the Fern Command Line Interface (CLI) by running:
33
+
> **Prefer a no-code setup?** Use the [guided UI](https://dashboard.buildwithfern.com/get-started) to get started from your browser instead.
36
34
37
-
```bash
38
-
npm install -g fern-api
39
-
```
35
+
Follow the steps below, or see the [Docs quickstart](https://buildwithfern.com/learn/docs/getting-started/quickstart) for a more detailed walkthrough.
40
36
41
-
### Step 2: Clone and open the repo in your preferred code editor
37
+
1.**Install the CLI**
42
38
43
-
Clone your newly created repository and open it in your favorite code editor (e.g., Cursor, VS Code).
39
+
```bash
40
+
npm install -g fern-api
41
+
```
44
42
45
-
The files and folders discussed in the following steps will be inside the `fern/` folder in your repository.
43
+
2.**Initialize your docs**
46
44
47
-
### Step 3: Customize your organization name
45
+
Clone this starter template, or run `fern init --docs` to start from scratch.
48
46
49
-
You need to replace `"plantstore"` with your own organization name in two files:
47
+
3.**Configure your organization**
50
48
51
-
**1. Update `fern.config.json`:**
52
-
Open the `fern.config.json` file and change the organization name:
49
+
Set your organization name in `fern.config.json` and your docs URL in `docs.yml`:
Run the following command to ensure you are using the latest version of Fern:
56
+
```yaml
57
+
# docs.yml
58
+
instances:
59
+
- url: your-org-name.docs.buildwithfern.com
60
+
```
62
61
63
-
```bash
64
-
fern upgrade
65
-
```
62
+
4. **Preview locally**
66
63
67
-
Replace `plantstore` with your own organization's name. Use only alphanumeric characters, hyphens, and underscores.
64
+
```bash
65
+
fern docs dev
66
+
```
68
67
69
-
**2. Update `docs.yml`:**
70
-
Open the `docs.yml` file and change the `instances.url` value from `plantstore` to your company name that you used for the `organization` name. **Do not use spaces and leave the rest of the URL (`docs.buildwithfern.com`) unchanged.**
68
+
5.**Publish**
71
69
72
-
It should now read:
70
+
```bash
71
+
fern generate --docs
72
+
```
73
73
74
-
```yml
75
-
instances:
76
-
- url: your-company-name.docs.buildwithfern.com
77
-
```
74
+
## Customize your docs
78
75
79
-
### Step 4: Generate your documentation
76
+
Once you're up and running, you can tailor your docs site to match your brand and product:
80
77
81
-
Run the following command:
82
-
83
-
```bash
84
-
fern generate --docs
85
-
```
86
-
87
-
You will be prompted to log in and connect your GitHub account.
88
-
89
-
You might also be prompted, `yes` or `no`, about if you want to proceed with generating docs and informed that you can choose between using the `--preview` flag or not. You can choose to use either `fern generate --docs` or `fern generate --docs --preview` at this time. This decision is important later, when you are making changes that might affect a production docs environment, but it won't impact your docs project now.
90
-
91
-
Once the documentation is generated, you will receive the URL where your documentation is published. For example:
92
-
93
-
```shell
94
-
┌─
95
-
│ ✓ your-company-name.docs.buildwithfern.com
96
-
└─
97
-
```
98
-
99
-
### Step 5: Try local development
100
-
101
-
Preview your documentation locally. Run `fern docs dev` to access your docs on your local server at port 3000, hot-reloading as you edit your markdown and OpenAPI files. [Learn more](https://buildwithfern.com/learn/docs/getting-started/development?utm_source=github&utm_medium=readme&utm_campaign=docs-starter-openapi&utm_content=step6) or [watch a 10-second demo](https://www.loom.com/share/0a4658bd78cb45d5a9519277852c7a24?sid=3ce69ad0-bfdb-4fa1-9abf-2f4366d084b9).
102
-
103
-
### Step 6: Preview your documentation
104
-
You can generate documentation previews
105
-
106
-
#### Generate previews from CLI
107
-
108
-
To preview updates to your documentation before publishing changes, run `fern generate --docs --preview`.
109
-
110
-
#### Configure PR previews
111
-
112
-
Your quickstart Fern project also includes GitHub Actions, including an action that enables generating previews in PRs. You don't need to update anything in the GitHub actions, but you do need to create a `FERN_TOKEN` auth token to enable them.
113
-
114
-
1. Open your GitHub repository and [create a new repository secret](https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/use-secrets#creating-secrets-for-a-repository).
115
-
2. For the **Name**, use `FERN_TOKEN`.
116
-
3. In your local terminal, run [`fern token`](https://buildwithfern.com/learn/cli-api-reference/cli-reference/commands#detailed-command-documentation) to generate an auth token value.
117
-
4. Copy the output from your terminal, and paste in GitHub as the **Value**.
118
-
5. Save your new secret.
119
-
120
-
You might need to re-run preview builds for any PRs that were opened before you configured the `FERN_TOKEN`.
121
-
122
-
For more information about built-in automation for previews and the `preview-docs.yml` GitHub action, see the [Previewing changes in a PR](https://buildwithfern.com/learn/docs/preview-publish/previewing-changes-in-a-pr#usage-in-github-actions) Fern docs.
123
-
124
-
### Step 7: Customize your documentation
125
-
126
-
You must run `fern generate --docs` after any modifications to re-generate and publish your documentation site.
127
-
128
-
To use your own OpenAPI specification file or to update the existing one:
129
-
130
-
- Update or replace the OpenAPI specification file in the `openapi/` folder.
131
-
-_Note: Don't have an OpenAPI spec? Use Fern's simpler format to define your API._[_Learn more_](https://github.com/fern-api/docs-starter-fern-definition?utm_source=github&utm_medium=readme&utm_campaign=docs-starter-openapi&utm_content=step7).
132
-
133
-
To modify the other docs pages:
134
-
135
-
- Update the Markdown files located in the `docs/pages/` folder, such as `welcome.mdx`.
136
-
137
-
To modify site styles and navigation, or to add new pages:
138
-
139
-
- See [Writing Content](https://buildwithfern.com/learn/docs/content/write-markdown?utm_source=github&utm_medium=readme&utm_campaign=docs-starter-openapi&utm_content=step7).
140
-
141
-
To learn about Fern's built-in component library you can use within MDX files:
142
-
143
-
- See the [Component Library](https://buildwithfern.com/learn/docs/content/components/overview?utm_source=github&utm_medium=readme&utm_campaign=docs-starter-openapi&utm_content=step7).
144
-
145
-
### Step 8: Set up a custom domain
146
-
147
-
If you wish to use a custom subdomain like `https://docs.YOUR_ORGANIZATION.com` or a subpath like `https://YOUR_ORGANIZATION.com/docs`, you can subscribe to the [Basic plan](https://buildwithfern.com/pricing?utm_source=github&utm_medium=readme&utm_campaign=docs-starter-openapi&utm_content=step8). Once subscribed, update `docs.yml` with the custom domain configuration:
148
-
149
-
```yaml
150
-
- url: plantstore.docs.buildwithfern.com
151
-
custom-domain: plantstore.dev
152
-
```
153
-
154
-
### Step 9: Use the Fern Dashboard
155
-
156
-
Access the [Fern Dashboard](https://buildwithfern.com) to monitor your docs and edit content in the browser.
157
-
158
-
**Analytics:** Track page views, search queries, user feedback, and API Explorer usage to understand how developers use your docs.
159
-
160
-
**Fern Editor:** Edit Markdown files directly in the browser with a WYSIWYG web editor. Ideal for non-technical team members who want to contribute to your docs. Edits appear as pull requests in GitHub and follow the same Git-backed approval workflow as code editor contributions.
161
-
162
-
### Step 10: Explore advanced features
163
-
164
-
For advanced documentation features and options, view the full [project structure](https://buildwithfern.com/learn/docs/getting-started/project-structure?utm_source=github&utm_medium=readme&utm_campaign=docs-starter-openapi&utm_content=step9).
165
-
166
-
Good luck creating beautiful and functional documentation! 🌿
78
+
-**[Brand your docs](https://buildwithfern.com/learn/docs/configuration/site-level-settings)** — Set custom colors, logo, favicon, and fonts in `docs.yml`
79
+
-**[Add an API reference](https://buildwithfern.com/learn/docs/api-references/generate-api-ref)** — Auto-generate interactive API docs from your OpenAPI spec
80
+
-**[Use components](https://buildwithfern.com/learn/docs/writing-content/components/overview)** — Tabs, accordions, callouts, cards, and more out of the box
81
+
-**[Set up a custom domain](https://buildwithfern.com/learn/docs/preview-publish/setting-up-your-domain)** — Host on your own domain (e.g., `docs.example.com`)
82
+
-**[Configure analytics](https://buildwithfern.com/learn/docs/integrations/overview)** — Integrate with PostHog, Segment, Google Tag Manager, and others
0 commit comments