Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
Loading