quarto-dev / quarto-dev/quarto-cli
Bibliography error for book when rendering to HTML while not specific in config
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Let's set up project
> quarto create project book test-book
> cd test-book
Modify _quarto.yml to have only
format:
docx: default
And then observe puzzling error here
❯ quarto render --to html
[1/4] index.qmd
[2/4] intro.qmd
[3/4] summary.qmd
[4/4] references.qmd
ERROR: Unable to determine proper path to use when computing bibliography path for index.html.
Stack trace:
at bookBibliography (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/project/types/book/book-bibliography.ts:105:11)
at eventLoopTick (ext:core/01_core.js:153:7)
at async bookBibliographyPostRender (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/project/types/book/book-bibliography.ts:135:48)
at async Object.bookPostRender [as postRender] (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/project/types/book/book-render.ts:614:5)
at async renderProject (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/render/project.ts:808:7)
at async Command.actionHandler (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/render/cmd.ts:248:26)
at async Command.execute (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/vendor/deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1948:7)
at async Command.parseCommand (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/vendor/deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1780:14)
at async quarto (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/quarto.ts:163:5)
at async file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/quarto.ts:185:5
and _quarto.yml does not have html specified in one of the format.
Originally posted by @cderv in https://github.com/quarto-dev/quarto-cli/issues/10427#issuecomment-2260098351
I believe
- Either this should work using
html: defaultif we provide--toat CLI. - Unless I missing something , and
--tois supposed to be only on of the project format specified, and in that case we need to error ealier before any rendering probably.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the project setup with quarto create project book test-book, the _quarto.yml containing only docx: default, and quarto render --to html. Start in src/project/types/book/book-bibliography.ts around bookBibliography, then follow book-bibliography.ts and book-render.ts post-render handling. Done means the CLI handles this configuration consistently, either rendering HTML successfully or reporting the format problem before rendering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- deno, typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100