Skip to content

Commit a2ebc42

Browse files
sbawabedevin-ai-integration[bot]devalog
authored
Revamp docs-starter with instructional content (#87)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Devin Logan <devinannlogan@gmail.com>
1 parent 9f056e7 commit a2ebc42

22 files changed

Lines changed: 563 additions & 1897 deletions

fern/docs.yml

Lines changed: 44 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ai-search:
88
location:
99
- docs
1010

11-
title: Plant Store
11+
title: Fern Docs Starter
1212

1313
layout:
1414
searchbar-placement: header
@@ -19,85 +19,80 @@ tabs:
1919
home:
2020
display-name: Docs
2121
icon: home
22-
guides:
23-
display-name: Guides
24-
icon: book
2522
API Reference:
2623
display-name: API Reference
2724
icon: puzzle
2825

2926
navigation:
3027
- tab: home
3128
layout:
32-
- section: Get Started
29+
- section: Get started
3330
contents:
3431
- page: Welcome
3532
path: docs/pages/welcome.mdx
36-
- tab: guides
37-
layout:
38-
- section: Get started
39-
contents:
40-
- page: Overview
41-
path: docs/pages/get-started/overview.mdx
42-
icon: fa-duotone fa-book-open
43-
- page: Quickstart
44-
path: docs/pages/get-started/quickstart.mdx
45-
icon: fa-duotone fa-rocket
46-
- section: Capabilities
47-
contents:
48-
- page: Plant management
49-
path: docs/pages/capabilities/plant-management.mdx
50-
icon: fa-duotone fa-seedling
51-
- page: Order processing
52-
path: docs/pages/capabilities/order-processing.mdx
53-
icon: fa-duotone fa-cart-shopping
54-
- page: Customer management
55-
path: docs/pages/capabilities/customer-management.mdx
56-
icon: fa-duotone fa-users
57-
- page: Inventory tracking
58-
path: docs/pages/capabilities/inventory-tracking.mdx
59-
icon: fa-duotone fa-boxes-stacked
60-
- section: Tutorials
61-
contents:
62-
- page: Searching for plants
63-
path: docs/pages/tutorials/searching-plants.mdx
64-
icon: fa-duotone fa-magnifying-glass
65-
- page: Creating your first order
66-
path: docs/pages/tutorials/first-order-tutorial.mdx
67-
icon: fa-duotone fa-bag-shopping
68-
- page: Managing plant inventory
69-
path: docs/pages/tutorials/inventory-tutorial.mdx
70-
icon: fa-duotone fa-clipboard-list
33+
icon: fa-duotone fa-house
34+
- page: Edit your docs
35+
path: docs/pages/editing-your-docs.mdx
36+
icon: fa-duotone fa-pen-to-square
37+
- page: Write content
38+
path: docs/pages/writing-content.mdx
39+
icon: fa-duotone fa-file-lines
40+
- page: Set up navigation
41+
path: docs/pages/navigation.mdx
42+
icon: fa-duotone fa-sitemap
43+
- page: Customize your docs
44+
path: docs/pages/customization.mdx
45+
icon: fa-duotone fa-palette
46+
- page: Support
47+
path: docs/pages/support.mdx
48+
icon: fa-duotone fa-headset
7149
- section: Changelog
7250
contents:
7351
- changelog: docs/changelog
7452
- tab: API Reference
7553
layout:
76-
- api: API Reference
54+
- section: Overview
55+
contents:
56+
- page: API reference
57+
path: docs/pages/api-reference-overview.mdx
58+
icon: fa-duotone fa-book
59+
- api: Plant Store API
60+
layout:
61+
- section: Plants
62+
referenced-packages:
63+
- plant
64+
contents: []
65+
- section: Users
66+
referenced-packages:
67+
- user
68+
contents: []
7769

7870
navbar-links:
7971
- type: minimal
8072
text: Fork this repo
8173
url: https://github.com/fern-api/docs-starter
8274
- type: filled
83-
text: Get a demo
84-
url: https://buildwithfern.com/contact?utm_campaign=demo&utm_medium=plantstore&utm_source=navbar
75+
text: Dashboard
76+
url: https://dashboard.buildwithfern.com
8577
- type: github
8678
value: https://github.com/fern-api/fern
8779

8880
colors:
89-
accentPrimary:
90-
dark: "#81C784"
91-
light: "#1B5E20"
81+
accent-primary:
82+
dark: "#70E155"
83+
light: "#008700"
84+
background:
85+
dark: "#111113"
86+
light: "#FFFFFF"
9287

9388
theme:
9489
page-actions: toolbar
9590
footer-nav: minimal
9691

9792
logo:
98-
dark: docs/assets/logo-dark.svg
99-
light: docs/assets/logo-light.svg
93+
dark: docs/assets/logo.svg
94+
light: docs/assets/logo.svg
10095
height: 20
101-
href: https://buildwithfern.com/?utm_campaign=demo&utm_medium=plantstore&utm_source=logo
96+
href: https://buildwithfern.com
10297

10398
favicon: docs/assets/favicon.svg

fern/docs/assets/logo.svg

Lines changed: 11 additions & 0 deletions
Loading
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
title: API reference
3+
subtitle: Interactive documentation generated from your API specification
4+
slug: api-reference
5+
---
6+
7+
Fern automatically generates interactive API reference documentation from your API specification. This starter template includes a sample Plant Store API to demonstrate the feature.
8+
9+
## Supported specifications
10+
11+
Fern supports multiple API specification formats:
12+
13+
| Format | Description | Documentation |
14+
|--------|-------------|---------------|
15+
| **OpenAPI** | The most widely used REST API specification format (versions 2.0, 3.0, and 3.1) | [OpenAPI docs](https://buildwithfern.com/learn/api-definitions/openapi/overview) |
16+
| **AsyncAPI** | For event-driven and message-based APIs | [AsyncAPI docs](https://buildwithfern.com/learn/api-definitions/asyncapi) |
17+
| **gRPC** | Protocol buffer definitions for gRPC services | [gRPC docs](https://buildwithfern.com/learn/api-definitions/protobuf) |
18+
19+
## How it works
20+
21+
Place your API specification file in the `fern/` directory and reference it in your `docs.yml` navigation:
22+
23+
```yaml title="docs.yml"
24+
navigation:
25+
- section: Documentation
26+
contents:
27+
- page: Overview
28+
path: docs/pages/overview.mdx
29+
- api: API Reference
30+
```
31+
32+
Fern parses your specification and generates:
33+
34+
- Endpoint documentation with request/response schemas
35+
- Interactive API Explorer for testing endpoints
36+
- Code snippets in multiple languages
37+
- Type definitions and examples
38+
39+
## API Explorer
40+
41+
The API Explorer lets users test API endpoints directly in the documentation. Users can fill in parameters, send requests, and see responses without leaving the page.
42+
43+
<Note>
44+
For advanced API Explorer features like auto-populating API keys, see the [API Explorer documentation](https://buildwithfern.com/learn/docs/api-references/api-explorer/overview).
45+
</Note>
46+
47+
## Customizing the API reference
48+
49+
Control how your API reference appears using the `api` configuration in `docs.yml`:
50+
51+
```yaml title="docs.yml"
52+
navigation:
53+
- api: API Reference
54+
api-name: plantstore
55+
paginated: true
56+
```
57+
58+
You can also add custom content to API reference pages, organize endpoints into groups, customize section names, and control which endpoints are visible.
59+
60+
<Note>
61+
For detailed customization options, see the [API reference documentation](https://buildwithfern.com/learn/docs/api-references/generate-api-ref).
62+
</Note>
63+
64+
## SDK code snippets
65+
66+
If you generate SDKs with Fern, code snippets automatically appear in your API reference showing how to call each endpoint using your SDK:
67+
68+
```yaml title="generators.yml"
69+
groups:
70+
python-sdk:
71+
generators:
72+
- name: fernapi/fern-python-sdk
73+
version: 4.3.1
74+
output:
75+
location: pypi
76+
package-name: plantstore
77+
```
78+
79+
<Note>
80+
For more information on SDK generation, see the [SDK documentation](https://buildwithfern.com/learn/sdks/overview/introduction).
81+
</Note>

0 commit comments

Comments
 (0)