Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: custom pages support #547

Merged
merged 8 commits into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,26 @@ This command also has a dry run mode, which can be useful for initial setup and
rdme changelogs:single path-to-markdown-file
```

### Custom Pages

#### Syncing a Folder of Custom Pages to ReadMe
kanadgupta marked this conversation as resolved.
Show resolved Hide resolved

Custom Pages has support for both Markdown and HTML files. These 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.

Passing in a path to a directory will also sync any HTML/Markdown files that are located in subdirectories.

```sh
rdme custompages path-to-markdown-files
```

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).

#### Syncing a Single Custom Page to ReadMe

```sh
rdme custompages:single path-to-markdown-file
```

### Versions

#### Get All Versions Associated With Your Project
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: This is the custom page title
---
Body
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: This is another custom page title
---
Another body
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Body
6 changes: 6 additions & 0 deletions __tests__/__fixtures__/custompages/failure-docs/new-doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
htmlmode: true
title: This is the custom page title
---

Body
5 changes: 5 additions & 0 deletions __tests__/__fixtures__/custompages/new-docs-html/new-doc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
hidden: false
---

<div></div>
6 changes: 6 additions & 0 deletions __tests__/__fixtures__/custompages/new-docs/new-doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
htmlmode: true
title: This is the custom page title
---

Body
7 changes: 7 additions & 0 deletions __tests__/__fixtures__/custompages/slug-docs/new-doc-slug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
htmlmode: true
title: This is the custom page title
slug: marc-actually-wrote-a-test
---

Body
Loading