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
Finally, navigate to the docs directory (where the `fern` folder is located) and execute the following command to generate your documentation:
52
+
</CodeBlock>
53
+
</CodeBlocks>
54
+
</Warning>
55
55
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
56
+
Finally, navigate to the docs directory (where the `fern` folder is located) and execute the following command to generate your documentation:
63
57
64
-
```bash
65
-
npm install -g fern-api
66
-
```
58
+
```bash
59
+
fern generate --docs
60
+
```
61
+
</Accordion>
67
62
68
-
Then run
63
+
<Accordion title="Use the Fern CLI">
64
+
If you prefer, you can use our CLI to create a new project. Install the CLI by running
69
65
70
-
```bash
71
-
fern init --docs
72
-
```
66
+
```bash
67
+
npm install -g fern-api
68
+
```
73
69
74
-
You will see a new `fern` folder in your project with the following structure:
70
+
Then run
75
71
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:
72
+
```bash
73
+
fern init --docs
74
+
```
82
75
83
-
```bash
84
-
fern generate --docs
85
-
```
86
-
</Accordion>
76
+
You will see a new `fern` folder in your project with the following structure:
77
+
78
+
```bash
79
+
fern
80
+
├─ docs.yml
81
+
└─ fern.config.json
82
+
```
83
+
84
+
Finally, navigate to the docs directory (where the `fern` folder is located) and execute the following command to generate your documentation:
85
+
86
+
```bash
87
+
fern generate --docs
88
+
```
89
+
</Accordion>
87
90
88
91
</AccordionGroup>
89
92
90
93
### Update your docs
91
94
92
95
<Note>
93
96
We provide a white-glove migration service as part of our Enterprise plan. Interested? Request it
94
-
[here](https://buildwithfern.com/contact).
97
+
[here](https://buildwithfern.com/contact).
98
+
95
99
</Note>
96
100
97
101
<AccordionGroup toc={true}>
98
-
<Accordion title='Add content' >
99
-
Add content with MDX files.
100
-
101
-
```markdown
102
-
---
103
-
title: "Page Title"
104
-
description: "Subtitle (optional)"
105
-
---
106
-
107
-
Hello world!
108
-
```
102
+
<Accordion title="Add content">
103
+
Add content with MDX files.
109
104
110
-
<Note title="Supported Syntax">
105
+
```markdown
106
+
---
107
+
title: "Page Title"
108
+
description: "Subtitle (optional)"
109
+
---
110
+
111
+
Hello world!
112
+
```
113
+
114
+
<Note title="Supported Syntax">
111
115
Fern supports [GitHub flavored Markdown (GFM)](https://github.github.com/gfm/) within MDX files, no plugin required.
112
-
</Note>
116
+
</Note>
113
117
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.
118
+
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
119
117
-
```yml
118
-
navigation:
119
-
- page: Hello World
120
-
path: docs/pages/hello-world.mdx
121
-
- section: Overview
122
-
contents:
123
-
- page: QuickStart
124
-
path: docs/pages/hello-world.mdx
125
-
```
126
-
</Accordion>
127
-
<Accordion title='Add an API Reference' >
128
-
Add an API Reference by adding an OpenAPI Specification to your project.
120
+
```
121
+
navigation:
122
+
- page: Hello World
123
+
path: docs/pages/hello-world.mdx
124
+
- section: Overview
125
+
contents:
126
+
- page: QuickStart
127
+
path: docs/pages/hello-world.mdx
128
+
```
129
+
</Accordion>
129
130
130
-
```bash
131
-
fern init --openapi /path/to/openapi.yml
132
-
```
131
+
<Accordiontitle="Add an API Reference">
132
+
Add an API Reference by adding an OpenAPI Specification to your project.
133
133
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.
134
+
```bash
135
+
fern init --openapi /path/to/openapi.yml
136
+
```
136
137
137
-
```yml
138
-
navigation:
139
-
- api: "API Reference"
140
-
```
141
-
</Accordion>
142
-
<Accordion title='Brand your docs'>
143
-
All of the branding for your docs can be configured in the `docs.yml` file.
138
+
This will create an `openapi.yml` file in your project. You can reference this file in your `docs.yml` file by adding an api block.
139
+
140
+
```
141
+
navigation:
142
+
- api: "API Reference"
143
+
```
144
+
</Accordion>
144
145
145
-
For example, to set the logos, colors, and fonts for your docs, you can
146
-
add the following to your `docs.yml` file:
146
+
<Accordiontitle="Brand your docs">
147
+
All of the branding for your docs can be configured in the `docs.yml` file.
147
148
148
-
<CodeBlock title="docs.yml">
149
+
For example, to set the logos, colors, and fonts for your docs, you can add the following to your `docs.yml` file:
150
+
151
+
<CodeBlocktitle="docs.yml">
149
152
```yml
150
153
colors:
151
154
accent-primary:
@@ -160,44 +163,63 @@ In this guide, we'll show you how to get started with Fern in under 5 minutes.
160
163
161
164
favicon: docs/assets/favicon.svg
162
165
```
163
-
</CodeBlock>
164
-
165
-
</Accordion>
166
+
</CodeBlock>
167
+
</Accordion>
166
168
167
169
</AccordionGroup>
168
-
170
+
169
171
### Preview your docs
172
+
170
173
<AccordionGroup toc={true}>
171
-
<Accordion title='Preview your docs locally'>
174
+
<Accordion title="Preview your docs locally">
172
175
You can preview your docs locally for testing purposes by following the instructions [here](/docs/preview-publish/previewing-changes-locally).
176
+
173
177
</Accordion>
174
-
<Accordion title='Preview your docs in a PR'>
178
+
179
+
<Accordion title="Preview your docs in a PR">
175
180
`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).
181
+
182
+
</Accordion>
183
+
184
+
<Accordion title="New section">
185
+
- Item one
186
+
187
+
- Item two
188
+
189
+
- Item three
190
+
191
+
```javascript
192
+
function test() {
193
+
console.log("HELLO WORLD");
194
+
}
195
+
```
176
196
</Accordion>
177
197
</AccordionGroup>
178
-
198
+
179
199
### Publish to production
180
200
181
201
<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.
202
+
<Accordion title="Publishing your docs">
203
+
When you are ready for your docs to be publicly accessible, you can publish them using the Fern CLI.
0 commit comments