Skip to content

Commit 9d1bcec

Browse files
authored
feat: changelog endpoints (#543)
* refactor: make `pushDoc` more generic ... so we can reuse it for Changelog! 🚀 No functional changes were made, docs tests should still pass. * chore: camelcase filePath, grammar tweaks * test: split out fixtures * chore: add changelog command category, rearrange * feat: initial pass at changelog commands * test: add test suite let's hope this is right lol * docs: update README.md * test: use fixtures in changelog subdir
1 parent da0f370 commit 9d1bcec

File tree

12 files changed

+826
-6
lines changed

12 files changed

+826
-6
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,26 @@ rdme docs:edit <slug> --version={project-version}
171171
rdme docs:single path-to-markdown-file --version={project-version}
172172
```
173173

174+
### Changelogs
175+
176+
#### Syncing a Folder of Markdown to ReadMe
177+
178+
The Markdown files will require YAML front matter with certain ReadMe documentation attributes. Check out [our docs](https://docs.readme.com/docs/rdme#markdown-file-setup) for more info on setting up your front matter.
179+
180+
Passing in a path to a directory will also sync any Markdown files that are located in subdirectories.
181+
182+
```sh
183+
rdme changelogs path-to-markdown-files
184+
```
185+
186+
This command also has a dry run mode, which can be useful for initial setup and debugging. You can read more about dry run mode [in our docs](https://docs.readme.com/docs/rdme#dry-run-mode).
187+
188+
#### Syncing a Single Markdown File to ReadMe
189+
190+
```sh
191+
rdme changelogs:single path-to-markdown-file
192+
```
193+
174194
### Versions
175195

176196
#### Get All Versions Associated With Your Project

__tests__/__fixtures__/changelogs/existing-docs/not-a-markdown-file

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: This is the changelog title
3+
---
4+
Body
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: This is another changelog title
3+
---
4+
Another body
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Body
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
type: added
3+
title: This is the changelog title
4+
---
5+
6+
Body
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
type: added
3+
title: This is the changelog title
4+
---
5+
6+
Body
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
type: added
3+
title: This is the changelog title
4+
slug: marc-actually-wrote-a-test
5+
---
6+
7+
Body

0 commit comments

Comments
 (0)