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
With Fern, you can build beautiful developer documentation that matches your brand. Fern supports writing pages (written in Markdown) and generating API Reference documentation (from an OpenAPI Specification).
8
+
With Fern, you can build beautiful developer documentation that matches your brand. Fern supports writing pages (written in Markdown) and generating API Reference documentation (from an OpenAPI Specification). and more!
9
9
10
10
In this guide, we'll show you how to get started with Fern in under 5 minutes.
11
11
12
+
EDIT
13
+
12
14
<Stepstoc={true}>
13
15
### Initialize your `fern` folder
14
-
15
-
All the configurations for your docs live in the `fern` folder. Inside, you'll
16
-
find a `docs.yml` file that contains all the settings for your documentation.
16
+
17
+
All the configurations for your docs live in the `fern` folder. Inside, you'll
18
+
find a `docs.yml` file that contains all the settings for your documentation.
17
19
18
20
<AccordionGrouptoc={true}>
19
-
<Accordiontitle='Clone the starter repository'>
20
-
Get started by cloning the [starter template](https://github.com/fern-api/docs-starter).
21
+
<Accordiontitle="Clone the starter repository">
22
+
Get started by cloning the [starter template](https://github.com/fern-api/docs-starter).
Finally, navigate to the docs directory (where the `fern` folder is located) and execute the following command to generate your documentation:
55
+
</CodeBlock>
56
+
</CodeBlocks>
57
+
</Warning>
55
58
56
-
```bash
57
-
fern generate --docs
58
-
```
59
-
</Accordion>
60
-
<Accordion title='Use the Fern CLI'>
61
-
If you prefer, you can use our CLI to create a new project. Install the CLI
62
-
by running
59
+
Finally, navigate to the docs directory (where the `fern` folder is located) and execute the following command to generate your documentation:
63
60
64
-
```bash
65
-
npm install -g fern-api
66
-
```
61
+
```bash
62
+
fern generate --docs
63
+
```
64
+
</Accordion>
67
65
68
-
Then run
66
+
<Accordion title="Use the Fern CLI">
67
+
If you prefer, you can use our CLI to create a new project. Install the CLI
68
+
by running
69
69
70
-
```bash
71
-
fern init --docs
72
-
```
70
+
```bash
71
+
npm install -g fern-api
72
+
```
73
73
74
-
You will see a new `fern` folder in your project with the following structure:
74
+
Then run
75
75
76
-
```bash
77
-
fern
78
-
├─ docs.yml
79
-
└─ fern.config.json
80
-
```
81
-
Finally, navigate to the docs directory (where the `fern` folder is located) and execute the following command to generate your documentation:
76
+
```bash
77
+
fern init --docs
78
+
```
82
79
83
-
```bash
84
-
fern generate --docs
85
-
```
86
-
</Accordion>
80
+
You will see a new `fern` folder in your project with the following structure:
81
+
82
+
```bash
83
+
fern
84
+
├─ docs.yml
85
+
└─ fern.config.json
86
+
```
87
+
88
+
Finally, navigate to the docs directory (where the `fern` folder is located) and execute the following command to generate your documentation:
89
+
90
+
```bash
91
+
fern generate --docs
92
+
```
93
+
</Accordion>
87
94
88
95
</AccordionGroup>
89
96
90
97
### Update your docs
91
98
92
99
<Note>
93
100
We provide a white-glove migration service as part of our Enterprise plan. Interested? Request it
94
-
[here](https://buildwithfern.com/contact).
101
+
[here](https://buildwithfern.com/contact).
102
+
95
103
</Note>
96
104
97
105
<AccordionGroup toc={true}>
98
-
<Accordion title='Add content' >
99
-
Add content with MDX files.
100
-
106
+
<Accordion title="Add content">
107
+
Add content with MDX files.
108
+
101
109
```markdown
102
110
---
103
111
title: "Page Title"
@@ -108,13 +116,12 @@ In this guide, we'll show you how to get started with Fern in under 5 minutes.
108
116
```
109
117
110
118
<Note title="Supported Syntax">
111
-
Fern supports [GitHub flavored Markdown (GFM)](https://github.github.com/gfm/) within MDX files, no plugin required.
119
+
Fern supports [GitHub flavored Markdown (GFM)](https://github.github.com/gfm/) within MDX files, no plugin required.
112
120
</Note>
113
121
114
-
In order for the Markdown page to show up, you'll need to reference them from your `docs.yml` file. You
115
-
can reference the Markdown page within a section or as a standalone page.
122
+
In order for the Markdown page to show up, you'll need to reference them from your `docs.yml` file. You can reference the Markdown page within a section or as a standalone page.
116
123
117
-
```yml
124
+
```
118
125
navigation:
119
126
- page: Hello World
120
127
path: docs/pages/hello-world.mdx
@@ -124,28 +131,31 @@ In this guide, we'll show you how to get started with Fern in under 5 minutes.
124
131
path: docs/pages/hello-world.mdx
125
132
```
126
133
</Accordion>
127
-
<Accordion title='Add an API Reference' >
134
+
135
+
<Accordiontitle="Add an API Reference">
128
136
Add an API Reference by adding an OpenAPI Specification to your project.
129
137
130
-
```bash
131
-
fern init --openapi /path/to/openapi.yml
132
-
```
138
+
```bash
139
+
fern init --openapi /path/to/openapi.yml
140
+
```
133
141
134
-
This will create an `openapi.yml` file in your project. You can reference this file in your
135
-
`docs.yml`file by adding an api block.
142
+
This will create an `openapi.yml` file in your project. You can reference this file in your
143
+
`docs.yml` file by adding an api block.
144
+
145
+
```yml
146
+
navigation:
147
+
- api: "API Reference"
148
+
```
136
149
137
-
```yml
138
-
navigation:
139
-
- api: "API Reference"
140
-
```
141
150
</Accordion>
142
-
<Accordion title='Brand your docs'>
151
+
152
+
<Accordion title="Brand your docs">
143
153
All of the branding for your docs can be configured in the `docs.yml` file.
144
154
145
-
For example, to set the logos, colors, and fonts for your docs, you can
146
-
add the following to your `docs.yml` file:
155
+
For example, to set the logos, colors, and fonts for your docs, you can
156
+
add the following to your `docs.yml` file:
147
157
148
-
<CodeBlock title="docs.yml">
158
+
<CodeBlock title="docs.yml">
149
159
```yml
150
160
colors:
151
161
accent-primary:
@@ -160,44 +170,48 @@ In this guide, we'll show you how to get started with Fern in under 5 minutes.
160
170
161
171
favicon: docs/assets/favicon.svg
162
172
```
163
-
</CodeBlock>
173
+
</CodeBlock>
164
174
165
175
</Accordion>
166
-
167
176
</AccordionGroup>
168
-
177
+
169
178
### Preview your docs
179
+
170
180
<AccordionGroup toc={true}>
171
-
<Accordion title='Preview your docs locally'>
172
-
You can preview your docs locally for testing purposes by following the instructions [here](/docs/preview-publish/previewing-changes-locally).
173
-
</Accordion>
174
-
<Accordion title='Preview your docs in a PR'>
175
-
`PR previews`offer a way to preview changes from pull requests (PRs) before merging code to a production branch. Learn more [here](/docs/preview-publish/previewing-changes-in-a-pr).
176
-
</Accordion>
181
+
<Accordion title="Preview your docs locally">
182
+
You can preview your docs locally for testing purposes by following the instructions [here](/docs/preview-publish/previewing-changes-locally).
183
+
</Accordion>
184
+
185
+
<Accordion title="Preview your docs in a PR">
186
+
`PR previews`offer a way to preview changes from pull requests (PRs) before merging code to a production branch. Learn more [here](/docs/preview-publish/previewing-changes-in-a-pr).
187
+
</Accordion>
188
+
177
189
</AccordionGroup>
178
-
190
+
179
191
### Publish to production
180
192
181
193
<AccordionGroup toc={true}>
182
-
<Accordion title='Publishing your docs'>
183
-
When you are ready for your docs to be publicly accessible, you can publish them using the Fern CLI.
194
+
<Accordion title="Publishing your docs">
195
+
When you are ready for your docs to be publicly accessible, you can publish them using the Fern CLI.
0 commit comments