Skip to content

default-image-extension should be better documented (was: A badge with no image extension is assumed to be PNG) #6092

@maelle

Description

@maelle

Bug description

In a blog where one of the post has this badge

[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/1882/badge)](https://bestpractices.coreinfrastructure.org/projects/1882)

the badge is converted to

<p><a href="https://bestpractices.coreinfrastructure.org/projects/1882"><img src="https://bestpractices.coreinfrastructure.org/projects/1882/badge.png" class="img-fluid figure-img"></a></p> 

therefore the image is missing.

Interestingly in the post listing (where I would not expect it to be included, other issue #6091), the badge is

<a href="./posts/post-with-code/index.html"> <img src="https://bestpractices.coreinfrastructure.org/projects/1882/badge" class="thumnail-image"> </a>

It might unusual for a badge to be specified without extension, though. I see it's also done for metacran badges https://github.com/r-lib/usethis/blob/d3614c701b9e2ee6f680a245d3315b1b941f49de/README.Rmd#L21

Steps to reproduce

https://github.com/maelle/badgeblog/blob/main/posts/post-with-code/index.qmd#L8

Expected behavior

I would expect no extension to be added to the image in the badge.

Actual behavior

A PNG extension is added.

Your environment

RStudio 2023.03.0+386 "Cherry Blossom" Release (3c53477afb13ab959aeb5b34df1f10c237b256c3, 2023-03-09) for Ubuntu Bionic
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) rstudio/2023.03.0+386 Chrome/108.0.5359.179 Electron/22.0.3 Safari/537.36

Quarto check output

[✓] Checking versions of quarto binary dependencies...
      Pandoc version 2.19.2: OK
      Dart Sass version 1.32.8: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.3.49
      Path: /opt/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.8.10
      Path: /usr/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.2.0
      Path: /opt/R/4.2.0/lib/R
      LibPaths:
        - /home/maelle/R/x86_64-pc-linux-gnu-library/4.2
        - /opt/R/4.2.0/lib/R/library
      rmarkdown: 2.22

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

Metadata

Metadata

Assignees

Labels

documentationDoc improvements & quarto-webearly-in-releaseAn issue that should be worked on early in the release (likely due to risk)needs-discussionIssues that require a team-wide discussion before proceeding furtherpandoc

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions