quarto-dev / quarto-dev/quarto-cli
profile-specific metadata files not being incorporated
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
I am trying to render a book with a profile-specific metadata file specified in the profile _quarto.yml. However, the profile-specific metadata file doesn't seem to actually be used. All of the relevant files can be found at https://github.com/poldrack/quarto_profile_test. The profile here is called "undergrad".
Here are the contents of the _quarto-undergrad.yml:
project:
title: "Undergrad Profile Detected from _quarto-undergrad.yml"
output-dir: _site-undergrad
metadata-files:
- _book-undergrad.yml
I know that the project setting is being parsed, because the output is placed in the specified directory. However, the settings in _book-undergrad.yml are not being included. This can be seen in several places when comparing the output - the title, authors, and chapters should be different for the specified profile, but they are not. However, the profile is being corrected detected when the pages are rendered, as the following code within one of the qmd files gives the expected output:
::: {.content-visible unless-profile="undergrad"}
This is the default profile.
:::
::: {.content-visible when-profile="undergrad"}
This is the undergrad profile.
:::
Steps to reproduce
git clone https://github.com/poldrack/quarto_profile_test
cd quarto_profile_test
make all
diff _book/index.html _site-undergrad/index.html
Expected behavior
there should be a number of differences, including different title, authors, and chapter listing.
Actual behavior
only the detected profile reported in the index.qmd file differs as expected.:
$ diff _book/index.html _site-undergrad/index.html
187c187
< <p>This is the default profile.</p>
---
> <p>This is the undergrad profile.</p>
Your environment
-OS: Ubuntu 22.04.3 LTS
(IDE not relevant as this runs in the shell)
Quarto check output
Note: this was done using the development version of quarto-cli, commit 3aab9b28b
Quarto 99.9.9
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.8: OK
Dart Sass version 1.55.0: OK
Deno version 1.33.4: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 99.9.9
Path: /home/poldrack/Dropbox/code/quarto-cli/package/dist/bin
(-) Checking tools....................Check file:///home/poldrack/Dropbox/code/quarto-cli/src/resources/vendor/deno-land/x/puppeteer@9-0-2/mod.ts
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/bin
Version: 2021
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.11.2 (Conda)
Path: /home/poldrack/miniconda3/envs/py311/bin/python
Jupyter: 5.3.0
Kernels: python3
(|) Checking Jupyter engine render....0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
(|) Checking Jupyter engine render....0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.1.2
Path: /usr/lib/R
LibPaths:
- /home/poldrack/R/x86_64-pc-linux-gnu-library/4.1
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: 1.41
rmarkdown: 2.19
[✓] Checking Knitr engine render......OK
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
Clone quarto_profile_test and run make all, then compare _book/index.html with _site-undergrad/index.html as described. Trace how _quarto-undergrad.yml is read alongside its metadata-files entry for _book-undergrad.yml, using index.qmd's profile-specific output as a reference. Done means the undergrad render includes the metadata file's title, authors, and chapter listing differences.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100