Skip to content

Commit 64f904b

Browse files
committed
always show prev and next buttons
1 parent 43744a2 commit 64f904b

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

.changeset/breezy-peaches-brush.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@hyperbook/markdown": minor
3+
"hyperbook": minor
4+
"hyperbook-studio": minor
5+
---
6+
7+
Prev and next buttons are now visible even in if hide is true. You have to manually disable them with prev: and next: .

packages/markdown/src/rehypeShell.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ const makeHeaderElements = (ctx: HyperbookContext): ElementContent[] => {
751751
const makeJump = (ctx: HyperbookContext): ElementContent[] => {
752752
const elements: ElementContent[] = [];
753753

754-
if (ctx.navigation.previous && !ctx.navigation.previous.hide) {
754+
if (ctx.navigation.previous) {
755755
elements.push({
756756
type: "element",
757757
tagName: "a",
@@ -768,7 +768,7 @@ const makeJump = (ctx: HyperbookContext): ElementContent[] => {
768768
});
769769
}
770770

771-
if (ctx.navigation.next && !ctx.navigation.next.hide) {
771+
if (ctx.navigation.next) {
772772
elements.push({
773773
type: "element",
774774
tagName: "a",
@@ -988,7 +988,7 @@ export default (ctx: HyperbookContext) => () => {
988988
} else if (layout === "standalone") {
989989
mainGridClass = "main-grid layout-standalone";
990990
}
991-
991+
992992
tree.children = [
993993
{
994994
type: "element",

website/en/book/changelog.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,21 @@ If you need a new feature, open an [issue](https://github.com/openpatch/hyperboo
3838
::::
3939
-->
4040

41+
## v0.69.0
42+
43+
::::tabs
44+
45+
:::tab{title="Improved :+1:" id="improved"}
46+
47+
- The previous and next button are now always enabled, even if hide is true. You have to manually disable them in the frontmatter like so:
48+
49+
```yaml
50+
prev:
51+
next:
52+
```
53+
54+
:::
55+
4156
## v0.68.2
4257
4358
::::tabs

0 commit comments

Comments
 (0)