Skip to content

Commit 072be84

Browse files
authored
Merge branch 'quarto-dev:main' into bugfix/issue-5752
2 parents 28b0860 + caa5451 commit 072be84

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

news/changelog-1.4.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
- ([#5624](https://github.com/quarto-dev/quarto-cli/issues/5624)): Add support for localized Cookie Consent (using either the document's language or by specifying the language explicitly under the cookie consent key).
4040
- ([#5756](https://github.com/quarto-dev/quarto-cli/issues/5756)): Add `rel="..."` resolution to navbar tools.
4141
- ([#5763](https://github.com/quarto-dev/quarto-cli/issues/5763)): Add support for a keyboard shortcut to launch search (defaults to `f` or `/`). Use `search` > `keyboard-shortcut` to override with your own key(s).
42+
- Add support for setting `page-navigation: true|false` in either a page or in `_metadata.yml`. This allows individual pages or sections of a website to control whether `page-navigaation` appears.
4243

4344
## Preview
4445

src/project/types/website/website-navigation.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ import {
8585
kBackToTopNavigation,
8686
kSiteIssueUrl,
8787
kSiteNavbar,
88+
kSitePageNavigation,
8889
kSiteReaderMode,
8990
kSiteRepoActions,
9091
kSiteRepoUrl,
@@ -253,8 +254,13 @@ export async function websiteNavigationExtras(
253254
};
254255

255256
// Determine the previous and next page
257+
const formatPageNav = format.metadata[kSitePageNavigation];
256258
const pageNavigation = nextAndPrevious(href, sidebar);
257-
if (navigation.pageNavigation && !usesCustomLayout) {
259+
if (
260+
formatPageNav !== false &&
261+
(navigation.pageNavigation || formatPageNav === true) &&
262+
!usesCustomLayout
263+
) {
258264
nav.prevPage = pageNavigation.prevPage;
259265
nav.nextPage = pageNavigation.nextPage;
260266

0 commit comments

Comments
 (0)