-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(theme): make prev/next links changeable (#1972)
Co-authored-by: Divyansh Singh <[email protected]>
- Loading branch information
1 parent
58f455b
commit b8a5e8e
Showing
3 changed files
with
65 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,43 @@ | ||
# Prev Next Link | ||
|
||
You can customize the text of previous and next links. This is helpful if you want to show different text on previous/next links than what you have on your sidebar. | ||
You can customize the text and link for the previous and next pages (shown at doc footer). This is helpful if you want a different text there than what you have on your sidebar. Additionally, you may find it useful to disable the footer or link to a page that is not included in your sidebar. | ||
|
||
## prev | ||
|
||
- Type: `string` | ||
- Type: `string | false | { text?: string; link?: string }` | ||
|
||
- Details: | ||
|
||
Specify the text to show on the link to the previous page. | ||
Specifies the text/link to show on the link to the previous page. If you don't set this in frontmatter, the text/link will be inferred from the sidebar config. | ||
|
||
If you don't set this in frontmatter, the text will be inferred from the sidebar config. | ||
- Examples: | ||
|
||
- Example: | ||
- To customize only the text: | ||
|
||
```yaml | ||
--- | ||
prev: 'Get Started | Markdown' | ||
--- | ||
``` | ||
```yaml | ||
--- | ||
prev: 'Get Started | Markdown' | ||
--- | ||
``` | ||
|
||
## next | ||
- To customize both text and link: | ||
|
||
- Type: `string` | ||
```yaml | ||
--- | ||
prev: | ||
text: 'Markdown' | ||
link: '/guide/markdown' | ||
--- | ||
``` | ||
|
||
- Details: | ||
- To hide previous page: | ||
|
||
```yaml | ||
--- | ||
prev: false | ||
--- | ||
``` | ||
|
||
## next | ||
|
||
Same as `prev` but for the next page. | ||
Same as `prev` but for the next page. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters