Skip to content

Commit 8332702

Browse files
feat(docs): keep a changelog (#4411)
* feat(docs): keep a changelog * fix linking to another file in project * swap plantstore link for humanloop * add icon
1 parent b949c1a commit 8332702

File tree

4 files changed

+156
-0
lines changed

4 files changed

+156
-0
lines changed

fern/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ navigation:
270270
- page: Reusable snippets
271271
icon: fa-regular fa-recycle
272272
path: ./pages/fern-docs/content/reusable-snippets.mdx
273+
- page: Changelog
274+
path: ./pages/docs/writing-content/changelog.mdx
275+
icon: fa-regular fa-clock
273276

274277
- section: API References
275278
contents:
378 KB
Loading
412 KB
Loading
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
---
2+
title: Keep a Changelog
3+
subtitle: Record the notable changes to your project
4+
---
5+
6+
Keep a record of how your project has changed by writing changelog entries. The changelog will automatically populate with the files contained within the `changelog` folder.
7+
8+
<Frame
9+
caption="Keep your users updated as your project evolves"
10+
background="subtle"
11+
>
12+
<img src="changelog-humanloop.png" />
13+
</Frame>
14+
15+
## Configure your Changelog
16+
17+
<AccordionGroup>
18+
<Accordion title='Top-level Changelog'>
19+
Configure a changelog for your project by creating a changelog folder.
20+
21+
<CodeBlock title="Configure a Changelog">
22+
```yaml {4-6}
23+
fern/
24+
├─ fern.config.json
25+
├─ docs.yml
26+
├─ changelog
27+
├─ 07-08-24.md
28+
└─ 08-21-24.mdx
29+
```
30+
</CodeBlock>
31+
32+
Once you've configured your changelog, specify where it should appear within your docs in your `docs.yml`.
33+
34+
<CodeBlock title="docs.yml">
35+
```yaml {8-11}
36+
tabs:
37+
guides:
38+
display-name: Guides
39+
icon: light book-open
40+
api:
41+
display-name: API Reference
42+
icon: light code
43+
changelog:
44+
display-name: Changelog
45+
icon: light clock
46+
changelog: ../changelog
47+
```
48+
</CodeBlock>
49+
50+
[View an example](https://github.com/humanloop/humanloop-docs/blob/30ddedaf6d2779361e8ee1f373f722364e5dd71d/fern/versions/v5.yml#L10-L13) in GitHub of Humanloop's `docs.yml` which powers [their Changelog](https://humanloop.com/docs/changelog).
51+
52+
</Accordion>
53+
<Accordion title='API-level Changelog'>
54+
Configure a changelog at the API-level by creating a changelog folder specific to an API.
55+
56+
<CodeBlocks>
57+
<CodeBlock title="OpenAPI">
58+
```yaml {6-8}
59+
fern/
60+
├─ fern.config.json
61+
├─ docs.yml
62+
└─ openapi/
63+
├─ openapi.yml
64+
└─ changelog
65+
├─ 07-15-24.md
66+
└─ 08-23-24.mdx
67+
```
68+
</CodeBlock>
69+
<CodeBlock title="Fern Definition">
70+
```yaml {7-9}
71+
fern/
72+
├─ fern.config.json
73+
├─ docs.yml
74+
└─ definition/
75+
├─ api.yml
76+
├─ imdb.yml
77+
└─ changelog
78+
├─ 07-15-24.md
79+
└─ 08-23-24.mdx
80+
```
81+
</CodeBlock>
82+
<CodeBlock title="Multiple APIs">
83+
```yaml {8-10,14-17}
84+
fern/
85+
├─ fern.config.json
86+
├─ docs.yml
87+
└─ user-api
88+
└─ openapi/
89+
├─ openapi.yml
90+
├─ openapi-overrides.yml
91+
└─ changelog
92+
├─ 07-15-24.md
93+
└─ 08-23-24.mdx
94+
└─ admin-api
95+
└─ openapi/
96+
├─ openapi.yml
97+
└─ changelog
98+
├─ 06-29-24.md
99+
└─ 08-02-24.md
100+
└─ 08-15-24.md
101+
```
102+
</CodeBlock>
103+
</CodeBlocks>
104+
105+
Changelogs contained within your API folder will automatically be displayed at the bottom of your API reference. You do not need to configure your changelog(s) within `docs.yml`.
106+
107+
View an example of a changelog per API in [Astronomer's docs](https://www.astronomer.io/docs/api/iam-api-reference/changelog).
108+
109+
<Frame
110+
caption="A unique changelog per API"
111+
background="subtle"
112+
>
113+
<img src="changelog-astronomer.png" />
114+
</Frame>
115+
116+
</Accordion>
117+
</AccordionGroup>
118+
119+
## Write a Changelog Entry
120+
121+
Create a new changelog entry by writing a markdown file. You can use `.md` or `.mdx` files. The benefit of using `.mdx` is that you can leverage the built-in [component library](../components/overview.mdx) within an entry.
122+
123+
<CodeBlock title = "fern/openapi/changelog/2024-07-31.mdx">
124+
```mdx
125+
## Summary
126+
127+
In the latest release, we've added endpoints to create a new Plant.
128+
129+
### What's new?
130+
131+
New endpoints:
132+
133+
- `POST /plant` add a new plant to inventory.
134+
135+
New object schemas:
136+
137+
- `CreatePlantRequest`
138+
139+
<Note> Have questions? Reach out to your local botanist. </Note>
140+
```
141+
</CodeBlock>
142+
143+
### Entry date
144+
145+
Changelog entries are automatically sorted chronologically by the date specific in the file name. Specify the date of your entry using one of the following formats:
146+
147+
- MM-DD-YYYY (e.g., 10-06-2024)
148+
- MM-DD-YY (e.g., 10-06-24)
149+
- YYYY-MM-DD (e.g., 2024-04-21)
150+
151+
### Linking to an Entry
152+
153+
Each changelog entry has a unique URL you can direct users to. For example, `https://humanloop.com/docs/v5/changelog/2024/8/16`

0 commit comments

Comments
 (0)