diff --git a/news/changelog-1.8.md b/news/changelog-1.8.md index 569cf4f96d3..8520e1526f1 100644 --- a/news/changelog-1.8.md +++ b/news/changelog-1.8.md @@ -2,6 +2,8 @@ ## In this release +- ([#13694](https://github.com/quarto-dev/quarto-cli/issues/13694)): Fix `notebook-view.url` being ignored - external notebook links now properly use specified URLs instead of local preview files. + ## In previous releases - ([#13369](https://github.com/quarto-dev/quarto-cli/issues/13369)): Fix failure in theme compilation when `brand.color.primary` is specified for light or dark but not both. diff --git a/src/format/html/format-html-notebook-preview.ts b/src/format/html/format-html-notebook-preview.ts index 9c0b6872623..02518739c88 100644 --- a/src/format/html/format-html-notebook-preview.ts +++ b/src/format/html/format-html-notebook-preview.ts @@ -252,7 +252,7 @@ export const notebookPreviewer = ( // to form links to this notebook const nbPreview = { title: resolvedTitle, - href: relative(inputDir, renderedNotebook[kHtmlPreview].hrefPath), + href: descriptor?.url || relative(inputDir, renderedNotebook[kHtmlPreview].hrefPath), supporting, resources, order: work.order, diff --git a/tests/docs/smoke-all/2023/01/05/notebook-preview-complex.qmd b/tests/docs/smoke-all/2023/01/05/notebook-preview-complex.qmd index b7eaae6856d..81ffa054624 100644 --- a/tests/docs/smoke-all/2023/01/05/notebook-preview-complex.qmd +++ b/tests/docs/smoke-all/2023/01/05/notebook-preview-complex.qmd @@ -29,7 +29,7 @@ _quarto: tests: html: ensureHtmlElements: - - ['a.quarto-notebook-link'] + - ['a.quarto-notebook-link[href*="kaggle.com"]'] - ['div.quarto-alternate-notebooks a'] ensureFileRegexMatches: - ['Source: TEST NB']