-
Notifications
You must be signed in to change notification settings - Fork 393
bugfix: resolve engines before ignoreDirs
#13798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
gordonwoodhull
merged 4 commits into
main
from
bugfix/resolve-engines-before-ignore-dirs
Dec 15, 2025
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
ecf8892
claude: Add smoke tests for book 404 page auto-detection
gordonwoodhull 7cdb2d7
claude: Add test for sidebar section linking to index.ipynb
gordonwoodhull e8dfc57
call resolveEngines before looking for ignoreDirs
gordonwoodhull 89d734d
changelog
gordonwoodhull File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| /.quarto/ | ||
| **/*.quarto_ipynb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
| "cells": [ | ||
| { | ||
| "cell_type": "markdown", | ||
| "id": "404-page-content", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "---\n", | ||
| "title: \"Page Not Found\"\n", | ||
| "---\n", | ||
| "\n", | ||
| "# 404 - Page Not Found\n", | ||
| "\n", | ||
| "Sorry, the page you're looking for doesn't exist." | ||
| ] | ||
| } | ||
| ], | ||
| "metadata": { | ||
| "kernelspec": { | ||
| "display_name": "Python 3", | ||
| "language": "python", | ||
| "name": "python3" | ||
| } | ||
| }, | ||
| "nbformat": 4, | ||
| "nbformat_minor": 2 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| project: | ||
| type: book | ||
|
|
||
| book: | ||
| title: "Test Book with 404" | ||
| author: "Test Author" | ||
| chapters: | ||
| - index.qmd | ||
| - chapter1.qmd | ||
|
|
||
| format: | ||
| html: | ||
| theme: default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Chapter 1 | ||
|
|
||
| Content here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Welcome | ||
|
|
||
| This is the index page. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| /.quarto/ | ||
| **/*.quarto_ipynb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| title: "Page Not Found" | ||
| --- | ||
|
|
||
| # 404 - Page Not Found | ||
|
|
||
| Sorry, the page you're looking for doesn't exist. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| project: | ||
| type: book | ||
|
|
||
| book: | ||
| title: "Test Book with 404 RMD" | ||
| author: "Test Author" | ||
| chapters: | ||
| - index.qmd | ||
| - chapter1.qmd | ||
|
|
||
| format: | ||
| html: | ||
| theme: default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Chapter 1 | ||
|
|
||
| Content here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Welcome | ||
|
|
||
| This is the index page. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /.quarto/ | ||
| **/*.quarto_ipynb | ||
| *_files/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| project: | ||
| type: default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| title: "Test Project" | ||
| --- | ||
|
|
||
| This file should be rendered. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| title: "Renv Test" | ||
| --- | ||
|
|
||
| This file should NOT be rendered (renv is a Knitr ignore directory). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| title: "Venv Test" | ||
| --- | ||
|
|
||
| This file should NOT be rendered (venv is a Jupyter ignore directory). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| /.quarto/ | ||
| **/*.quarto_ipynb | ||
| *_files/ | ||
| _site/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| project: | ||
| type: website | ||
|
|
||
| website: | ||
| title: "Test Website" | ||
| navbar: | ||
| left: | ||
| - text: Home | ||
| file: index.qmd | ||
|
|
||
| format: | ||
| html: | ||
| theme: default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| title: "Test Website" | ||
| --- | ||
|
|
||
| This file should be rendered. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| title: "Renv Test" | ||
| --- | ||
|
|
||
| This file should NOT be rendered (renv is a Knitr ignore directory). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| title: "Venv Test" | ||
| --- | ||
|
|
||
| This file should NOT be rendered (venv is a Jupyter ignore directory). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| /.quarto/ | ||
| **/*.quarto_ipynb | ||
| *_files/ | ||
| _site/ |
14 changes: 14 additions & 0 deletions
14
tests/docs/websites/website-sidebar-section-index/_quarto.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| project: | ||
| type: website | ||
|
|
||
| website: | ||
| title: "Sidebar Auto Test" | ||
| sidebar: | ||
| contents: | ||
| - index.qmd | ||
| - section: "Subdir Section" | ||
| contents: subdir/* | ||
|
|
||
| format: | ||
| html: | ||
| theme: default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| title: "Home" | ||
| --- | ||
|
|
||
| This is the home page. |
33 changes: 33 additions & 0 deletions
33
tests/docs/websites/website-sidebar-section-index/subdir/index.ipynb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| { | ||
| "cells": [ | ||
| { | ||
| "cell_type": "raw", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "---\n", | ||
| "title: \"Subdir Index\"\n", | ||
| "---" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "This is the index page for the subdir." | ||
| ] | ||
| } | ||
| ], | ||
| "metadata": { | ||
| "kernelspec": { | ||
| "display_name": "Python 3", | ||
| "language": "python", | ||
| "name": "python3" | ||
| }, | ||
| "language_info": { | ||
| "name": "python", | ||
| "version": "3.9.0" | ||
| } | ||
| }, | ||
| "nbformat": 4, | ||
| "nbformat_minor": 4 | ||
| } |
5 changes: 5 additions & 0 deletions
5
tests/docs/websites/website-sidebar-section-index/subdir/other.qmd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| title: "Other Page" | ||
| --- | ||
|
|
||
| This is another page in the subdir. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| import { testQuartoCmd } from "../../test.ts"; | ||
| import { fileExists, noErrorsOrWarnings } from "../../verify.ts"; | ||
| import { existsSync } from "../../../src/deno_ral/fs.ts"; | ||
| import { join } from "../../../src/deno_ral/path.ts"; | ||
| import { docs } from "../../utils.ts"; | ||
|
|
||
| // Test that book 404 page with .ipynb extension is detected | ||
| const inputIpynb = docs("books/book-404-detection"); | ||
| const outputDirIpynb = join(inputIpynb, "_book"); | ||
|
|
||
| testQuartoCmd( | ||
| "render", | ||
| [inputIpynb], | ||
| [ | ||
| noErrorsOrWarnings, | ||
| fileExists(join(outputDirIpynb, "index.html")), | ||
| fileExists(join(outputDirIpynb, "chapter1.html")), | ||
| fileExists(join(outputDirIpynb, "404.html")), | ||
| fileExists(join(outputDirIpynb, "search.json")), | ||
| ], | ||
| { | ||
| teardown: async () => { | ||
| if (existsSync(outputDirIpynb)) { | ||
| await Deno.remove(outputDirIpynb, { recursive: true }); | ||
| } | ||
| }, | ||
| }, | ||
| ); | ||
|
|
||
| // Test that book 404 page with .rmd extension is detected | ||
| const inputRmd = docs("books/book-404-rmd"); | ||
| const outputDirRmd = join(inputRmd, "_book"); | ||
|
|
||
| testQuartoCmd( | ||
| "render", | ||
| [inputRmd], | ||
| [ | ||
| noErrorsOrWarnings, | ||
| fileExists(join(outputDirRmd, "index.html")), | ||
| fileExists(join(outputDirRmd, "chapter1.html")), | ||
| fileExists(join(outputDirRmd, "404.html")), | ||
| fileExists(join(outputDirRmd, "search.json")), | ||
| ], | ||
| { | ||
| teardown: async () => { | ||
| if (existsSync(outputDirRmd)) { | ||
| await Deno.remove(outputDirRmd, { recursive: true }); | ||
| } | ||
| }, | ||
| }, | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| /* | ||
| * project-ignore-dirs.test.ts | ||
| * | ||
| * Verifies that engine-specific ignore directories (venv, renv, env, packrat, etc.) | ||
| * are properly excluded from project file discovery and rendering. | ||
| * | ||
| * Copyright (C) 2020-2025 Posit Software, PBC | ||
| */ | ||
|
|
||
| import { docs } from "../../utils.ts"; | ||
| import { join } from "../../../src/deno_ral/path.ts"; | ||
| import { existsSync } from "../../../src/deno_ral/fs.ts"; | ||
| import { testQuartoCmd } from "../../test.ts"; | ||
| import { fileExists, noErrors, pathDoNotExists } from "../../verify.ts"; | ||
|
|
||
| const renderDir = docs("project/ignore-dirs"); | ||
| const outDir = join(Deno.cwd(), renderDir); | ||
|
|
||
| // Test that engine ignore directories are properly excluded | ||
| testQuartoCmd( | ||
| "render", | ||
| [renderDir], | ||
| [ | ||
| noErrors, | ||
| fileExists(join(outDir, "index.html")), // Control: regular file should be rendered | ||
| pathDoNotExists(join(outDir, "venv", "test.html")), // venv (Jupyter) should be ignored | ||
| pathDoNotExists(join(outDir, "renv", "test.html")), // renv (Knitr) should be ignored | ||
| pathDoNotExists(join(outDir, "env", "test.html")), // env (Jupyter) should be ignored | ||
| ], | ||
| { | ||
| teardown: async () => { | ||
| // Clean up rendered HTML files | ||
| const htmlFiles = [ | ||
| join(outDir, "index.html"), | ||
| join(outDir, "venv", "test.html"), | ||
| join(outDir, "renv", "test.html"), | ||
| join(outDir, "env", "test.html"), | ||
| ]; | ||
| for (const file of htmlFiles) { | ||
| if (existsSync(file)) { | ||
| await Deno.remove(file); | ||
| } | ||
| } | ||
| }, | ||
| }, | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| /* | ||
| * website-ignore-dirs.test.ts | ||
| * | ||
| * Verifies that engine-specific ignore directories (venv, renv, env, packrat, etc.) | ||
| * are properly excluded from website file discovery and rendering. | ||
| * | ||
| * Copyright (C) 2020-2025 Posit Software, PBC | ||
| */ | ||
|
|
||
| import { docs } from "../../utils.ts"; | ||
| import { join } from "../../../src/deno_ral/path.ts"; | ||
| import { existsSync } from "../../../src/deno_ral/fs.ts"; | ||
| import { testQuartoCmd } from "../../test.ts"; | ||
| import { fileExists, noErrors, pathDoNotExists } from "../../verify.ts"; | ||
|
|
||
| const renderDir = docs("websites/website-ignore-dirs"); | ||
| const outDir = join(Deno.cwd(), renderDir, "_site"); | ||
|
|
||
| // Test that engine ignore directories are properly excluded | ||
| testQuartoCmd( | ||
| "render", | ||
| [renderDir], | ||
| [ | ||
| noErrors, | ||
| fileExists(join(outDir, "index.html")), // Control: regular file should be rendered | ||
| pathDoNotExists(join(outDir, "venv", "test.html")), // venv (Jupyter) should be ignored | ||
| pathDoNotExists(join(outDir, "renv", "test.html")), // renv (Knitr) should be ignored | ||
| pathDoNotExists(join(outDir, "env", "test.html")), // env (Jupyter) should be ignored | ||
| ], | ||
| { | ||
| teardown: async () => { | ||
| if (existsSync(outDir)) { | ||
| await Deno.remove(outDir, { recursive: true }); | ||
| } | ||
| }, | ||
| }, | ||
| ); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gordonwoodhull I don't think this is the right place for this.
Regression fixes in 1.9 changelog are the bug fix we do in 1.9 AND also in 1.8 to fix a regression that we introduced in 1.8 compared to 1.9.
For regression between a 1.9 pre-release, and another, we don't add changelog. It is in a way expected that a 1.9 pre-release could brok. So this PR is part of the "New engine extensions" item you added a bit lower.
Hope it makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @cderv, I was wondering as I did this. Felt weird not to log what the prerelease 1.9.14 will be about!
But I guess it's probably not helpful except for the very few people for whom 1.9.13 is breaking - and we haven't heard from any yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes exactly. We don't have a good process for that.
I guess the right place would to mark this inside the 1.9.14 release note. Currently we only link users to the commit logs if you look at it: https://github.com/quarto-dev/quarto-cli/releases/tag/v1.9.13
We could find a new workflow logic to maybe add to this github release note some more information about what is noticeable in each pre-release. But this is a bit more work for us.
Unless we find an "automated way" by having specific keyword in commit, and looking for them to extract message for release not when we do create the github release 🤷♂️
Anyhow, our current logic is that there is no release note of specific changes for a specific prerelease (unless looking at commit themselves), and we advice all users to either use stable or very latest pre-release as it could be "normal" that a pre-release has breakage.
For no breakage => use stable. That is our logic I would say.
happy to evolve all this - to be discussed!