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
Copy file name to clipboardExpand all lines: README.md
+28-4Lines changed: 28 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,10 @@ Run the following command to ensure you are using the latest version of Fern:
64
64
fern upgrade
65
65
```
66
66
67
-
Replace `plantstore` with your own organization's name. Use only alphanumeric characters, hyphens, and underscores. Do not use spaces and leave the rest of the URL (`docs.buildwithfern.com`) unchanged.
67
+
Replace `plantstore` with your own organization's name. Use only alphanumeric characters, hyphens, and underscores.
68
+
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
71
69
72
It should now read:
70
73
@@ -81,7 +84,9 @@ Run the following command:
81
84
fern generate --docs
82
85
```
83
86
84
-
You will be prompted to log in and connect your GitHub account.
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.
85
90
86
91
Once the documentation is generated, you will receive the URL where your documentation is published. For example:
87
92
@@ -95,12 +100,31 @@ Once the documentation is generated, you will receive the URL where your documen
95
100
96
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).
97
102
98
-
### Step 6: Customize your documentation
103
+
### Step 6: Preview your documentation
104
+
You can generate documentation previews
99
105
100
-
You must run `fern generate --docs` after any modifications to re-generate and publish your documentation site.
106
+
#### Generate previews from CLI
101
107
102
108
To preview updates to your documentation before publishing changes, run `fern generate --docs --preview`.
103
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
+
104
128
To use your own OpenAPI specification file or to update the existing one:
105
129
106
130
- Update or replace the OpenAPI specification file in the `openapi/` folder.
0 commit comments