Skip to content

Website listings ignore .svg cover images #12616

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

Open
alyst opened this issue Apr 24, 2025 · 1 comment · May be fixed by #12617
Open

Website listings ignore .svg cover images #12616

alyst opened this issue Apr 24, 2025 · 1 comment · May be fixed by #12617
Assignees
Labels
bug Something isn't working websites Issues creating websites
Milestone

Comments

@alyst
Copy link

alyst commented Apr 24, 2025

Bug description

Per Quarto documentation, notebook figures with ids starting with feature, cover and thumbnail would be preferentially used as thumbnails in the listings. However, the regex for locating these figures (in the current discover-meta.ts):

const kNamedFilePattern =
  "(.*?(?:preview|feature|cover|thumbnail).*?(?:\\.png|\\.gif|\\.jpg|\\.jpeg|\\.webp))";

does not include *.svg, so SVG figures are skipped regardless of the figure ID.

It seems, there should be no technical issues with using SVGs: the notebooks, where the only figure is in SVG format, show nicely in the listings. In fact, SVGs are much better for downscaling than the raster formats.

Steps to reproduce

I can provide the MRE, if required, but the issue here is quite straightforward, and the MRE would include 2 notebooks and 2 figures.

Actual behavior

SVG figure with the ID starting with cover is not used as the thumbnail.
Instead, another figure in .png format and the ID that does not start with cover/feature/thumbnail is used as the thumbnail.

Expected behavior

SVG figure is used as the thumbnail.

Your environment

  • IDE: VS Code 1.99.3
  • OS: Ubuntu 24.10

Quarto check output

Quarto 1.6.42
[✓] Checking environment information...
      Quarto cache location: /home/ubuntu/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.4.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.46.3: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.6.42
      Path: /opt/quarto/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.12.7
      Path: /home/ubuntu/.local/bin/python3
      Jupyter: 5.7.2
      Kernels: ir, julia-1.11, python3

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

[✓] Checking R installation...........OK
      Version: 4.4.1
      Path: /usr/lib/R
      LibPaths:
        - /home/ubuntu/R/x86_64-pc-linux-gnu-library/4.4
        - /usr/local/lib/R/site-library
        - /usr/lib/R/site-library
        - /usr/lib/R/library
      knitr: 1.50
      rmarkdown: 2.29

[✓] Checking Knitr engine render......OK
@alyst alyst added the bug Something isn't working label Apr 24, 2025
@cscheid cscheid self-assigned this Apr 24, 2025
@cscheid cscheid added this to the v1.8 milestone Apr 24, 2025
@cscheid cscheid added the websites Issues creating websites label Apr 24, 2025
@cscheid
Copy link
Collaborator

cscheid commented Apr 24, 2025

Thanks for the report! We're a couple of days away from a 1.7 release, but we'll fix this right away in 1.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working websites Issues creating websites
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants