Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions news/changelog-1.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ All changes included in 1.9:
- ([#13570](https://github.com/quarto-dev/quarto-cli/pull/13570)): Replace Twitter with Bluesky in default blog template and documentation examples. New blog projects now include Bluesky social links instead of Twitter.
- ([#13716](https://github.com/quarto-dev/quarto-cli/issues/13716)): Fix draft pages showing blank during preview when pre-render scripts are configured.

### `book`

- ([#13769](https://github.com/quarto-dev/quarto-cli/issues/13769)): Apply `repo-link-target` and `repo-link-rel` options to tools in book sidebar for consistent link attribute handling with website projects. (author: @mcanouil)

### `manuscript`

- ([#10031](https://github.com/quarto-dev/quarto-cli/issues/10031)): Fix manuscript rendering prompting for GitHub credentials when origin points to private repository. Auto-detection of manuscript URL now fails gracefully with a warning instead of blocking renders.
Expand Down
19 changes: 17 additions & 2 deletions src/project/types/book/book-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ import {
import {
repoUrlIcon,
websiteConfigActions,
websiteConfigString,
websiteProjectConfig,
} from "../website/website-config.ts";

Expand Down Expand Up @@ -229,11 +230,25 @@ export async function bookProjectConfig(
if (site[kSiteRepoUrl]) {
const repoUrl = siteRepoUrl(site);
const icon = repoUrlIcon(repoUrl);
tools.push({
const tool = {
text: language[kCodeToolsSourceCode] || "Source Code",
icon,
href: repoUrl,
});
} as Record<string, unknown>;

// Apply repo-link-target if configured
const linkTarget = websiteConfigString(kSiteRepoLinkTarget, config);
if (linkTarget) {
tool.target = linkTarget;
}

// Apply repo-link-rel if configured
const linkRel = websiteConfigString(kSiteRepoLinkRel, config);
if (linkRel) {
tool.rel = linkRel;
}

tools.push(tool);
}
tools.push(...(downloadTools(projectDir, config, language) || []));
tools.push(...(sharingTools(config, language) || []));
Expand Down
20 changes: 20 additions & 0 deletions tests/docs/smoke-all/2025/12/10/13769/_quarto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
project:
type: book

book:
title: "issue13769"
author: "Norah Jones"
date: "12/10/2025"
repo-url: "https://github.com/quarto-dev/quarto-cli"
repo-link-target: "_blank"
repo-link-rel: "noreferrer"
repo-actions: none
chapters:
- index.qmd


format:
html:
theme:
- cosmo
- brand
13 changes: 13 additions & 0 deletions tests/docs/smoke-all/2025/12/10/13769/index.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
_quarto:
tests:
html:
ensureHtmlElements:
- ['a[rel="noreferrer"][target="_blank"][href="https://github.com/quarto-dev/quarto-cli"][class~="quarto-navigation-tool"]']
---

# Preface

This is a Quarto book.

To learn more about Quarto books visit <https://quarto.org/docs/books>.
Loading