quarto-dev / quarto-dev/quarto-cli

`embed-resources` option doesn't work when rendering from non-input directory

Open
#8,208 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

In quarto render in pre-release version 1.4.528, "--to " is incompatible with "dashboard". The output becomes funky if --to dashboard is used and these warning are outputted:
[WARNING] Could not fetch resource dashboard_files/libs/clipboard/clipboard.min.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-html/quarto.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-html/popper.min.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-html/tippy.umd.min.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-html/anchor.min.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-html/tippy.css [WARNING] Could not fetch resource dashboard_files/libs/quarto-html/quarto-syntax-highlighting.css [WARNING] Could not fetch resource dashboard_files/libs/bootstrap/bootstrap.min.js [WARNING] Could not fetch resource dashboard_files/libs/bootstrap/bootstrap-icons.css [WARNING] Could not fetch resource dashboard_files/libs/bootstrap/bootstrap.min.css [WARNING] Could not fetch resource dashboard_files/libs/quarto-dashboard/quarto-dashboard.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-dashboard/stickythead.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-dashboard/datatables.min.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-dashboard/pdfmake.min.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-dashboard/vfs_fonts.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-dashboard/web-components.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-dashboard/components.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-dashboard/datatables.min.css [WARNING] Could not fetch resource dashboard_files/figure-html/cell-5-output-1.png

Steps to reproduce

quarto render dashboard.qmd --to dashboard --execute --output index.html -M self-contained:True

Expected behavior

Hopefully the output would look the same as when "--to dashboard" is not used and format: "dashboard" is used yaml.

Actual behavior

The output is missing a lot of resources.
[WARNING] Could not fetch resource dashboard_files/libs/clipboard/clipboard.min.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-html/quarto.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-html/popper.min.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-html/tippy.umd.min.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-html/anchor.min.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-html/tippy.css [WARNING] Could not fetch resource dashboard_files/libs/quarto-html/quarto-syntax-highlighting.css [WARNING] Could not fetch resource dashboard_files/libs/bootstrap/bootstrap.min.js [WARNING] Could not fetch resource dashboard_files/libs/bootstrap/bootstrap-icons.css [WARNING] Could not fetch resource dashboard_files/libs/bootstrap/bootstrap.min.css [WARNING] Could not fetch resource dashboard_files/libs/quarto-dashboard/quarto-dashboard.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-dashboard/stickythead.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-dashboard/datatables.min.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-dashboard/pdfmake.min.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-dashboard/vfs_fonts.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-dashboard/web-components.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-dashboard/components.js [WARNING] Could not fetch resource dashboard_files/libs/quarto-dashboard/datatables.min.css [WARNING] Could not fetch resource dashboard_files/figure-html/cell-5-output-1.png

Your environment

No response

Quarto check output

`Quarto 1.4.538
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.69.5: OK
Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.4.538
Path: /home/user/opt/quarto-1.4.538/bin

[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)

[✓] Checking LaTeX....................OK
Tex: (not detected)

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
Version: 3.10.12 (Conda)
Path: /home/user/miniconda3/envs/env/bin/python
Jupyter: 5.3.1
Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........(None)

  Unable to locate an installed version of R.
  Install R from https://cloud.r-project.org/`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with quarto render dashboard.qmd --to dashboard --execute --output index.html -M self-contained:True, then trace the embed-resources handling for renders from a non-input directory. Done means the dashboard output includes the listed JavaScript, CSS, and image resources without fetch warnings and matches the YAML format: dashboard result.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.