Your docs can look this good:
- Click on the "Use this template" button.
- Create a new repository. Name it anything you like,
docs
is a common naming choice.
Clone your newly created repository and open it in your favorite integrated development environment (IDE) or code editor.
In the fern.config.json file, replace the placeholder organization name with your actual organization name. For example:
{
"organization": "YourOrganization",
"version": "0.15.18"
}
Also, in the docs.yml file, update the docs URL to match your organization's naming convention. For example:
instances:
- url: your-organization.docs.buildwithfern.com
- Install the Fern CLI by running:
npm install -g fern-api
- Generate your documentation with the following command:
fern generate --docs
You will be prompted to log in and connect your GitHub account.
Once the documentation is generated, you will receive a URL where your documentation is published. For example:
┌─
│ ✓ your-organization.docs.buildwithfern.com
└─
If you're using a Fern Definition, you can edit the files within the definition
folder.
If you're using an OpenAPI Specification, then run the command: fern generate
. You'll see a new folder created called openapi
that contains your spec. You can edit this spec to make it your own OR copy and paste a spec you already have. Then, delete the definition
folder.
Next, modify the markdown pages located in the pages directory. You can further tailor your documentation to match your brand by adjusting settings in the docs.yml file.
Fern has a built-in component library for you to use. Explore the components.
If you wish to use a custom domain like docs.your-organization.com
or a subdirectory like your-organization.com/docs
, you can subscribe to the Starter plan. Once subscribed, update docs.yml with the custom domain configuration:
- url: your-organization.docs.buildwithfern.com
custom-domain: docs.your-organization.com
For advanced documentation features and options, visit the Fern Docs.
Advanced features include:
- Versioning
- Changelog
- Multiple APIs
- Custom background
- Bring your own fonts
Good luck creating beautiful and functional documentation! 🌿