Description
Bug description
When revealjs-url
is used, the path is not relative to the document in which the key appears, but rather the working directory where quarto render
or quarto preview
are called. I believe the path to revealjs-url
should be relative to the source document and should be resolved as part of the metadata resolution.
Steps to reproduce
quarto create project website reprex --no-prompt --no-open
cd reprex
mkdir slides
cd slides
# Checkout a version of revealjs
gh repo clone hakimel/reveal.js revealjs-4.5.0
cd revealjs-4.5.0
git checkout 4.5.0
cd ..
# Write slide content
cat <<EOF > slides.qmd
---
format:
revealjs:
revealjs-url: revealjs-4.5.0
---
EOF
Note the relative path in revealjs-url
. Calling quarto render slide.qmd
from inside slides/
works, but if you move up one directory, the website fails to render.
quarto render slides.qmd
cd ..
quarto render
[1/5] index.qmd
[2/5] slides/slides.qmd
ERROR: WalkError: No such file or directory (os error 2): readdir 'revealjs-4.5.0/dist' for path "revealjs-4.5.0/dist"
If you make revealjs-url
relative to the website root, it will work for a bit. But if you happen to have your website inside a folder in your repo, e.g. website/
, then quarto render website
will fail (this is effectively what's called by the quarto-actions/publish
action).
Expected behavior
revealjs-url
should be relative to the place where it's defined, and should not change when quarto render
is called from a different directory.
Actual behavior
quarto render
works from some directories and fails from others.
Your environment
Default quarto-actions/publish action (same version of quarto as reported below). Also locally on MacOS 14.5
Quarto check output
Quarto 1.5.55
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.2.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.41.0: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.5.55
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (external install)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/garrick/Library/TinyTeX/bin/universal-darwin
Version: 2022
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.12.2
Path: /Users/garrick/.rye/py/cpython@3.12.2/bin/python3
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[✓] Checking R installation...........OK
Version: 4.4.1
Path: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources
LibPaths:
- /Users/garrick/Library/R/arm64/4.4/library
- /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
knitr: 1.48
rmarkdown: 2.27
[✓] Checking Knitr engine render......OK