Skip to content
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

The markdown syntax for alerts is not rendered properly #2701

Open
jmaspons opened this issue Jul 7, 2024 · 4 comments
Open

The markdown syntax for alerts is not rendered properly #2701

jmaspons opened this issue Jul 7, 2024 · 4 comments

Comments

@jmaspons
Copy link
Contributor

jmaspons commented Jul 7, 2024

See Alerts

An example of alerts not rendered in pkgdown VS rendered on gh

@jayhesselberth
Copy link
Collaborator

Confirming GH alert blocks don't work in vignettes either. Nor do quarto callouts in quarto vignettes.

There are at least two issues:

  1. Markdown conversion to HTML. It is likely that GH is doing something under the hood to process these blocks. You might try to see if this markup is maintained after pandoc conversion. pkgdown does not have any of the special div classes associated with these blocks.
image
  1. CSS formatting. GitHub provides CSS classes for these blocks that we don't have in pkgdown.

So, I think this would be a fair bit of work to incoporate into pkgdown.

@jayhesselberth
Copy link
Collaborator

FWIW, I also tried the following, which also doesn't work:

  1. Create a README.qmd at the top level with the following header:
---
format: gfm
---
  1. Add a quarto callout to the page:
::: {.callout-note}
Note that there are five types of callouts, including:
`note`, `warning`, `important`, `tip`, and `caution`.
:::

Render that with quarto to README.md. If you click the "Render" button in RStudio it will use quarto to create README.md.

But unfortunately callouts are not currently supported in the quarto gfm format.

Yet another alternative is to create an README.qmd file but leave output: github_document in the YAML header. In this case, clicking Render will generate a README.html file that has correctly formatted quarto callouts. But I'm not sure what would happen if you add this to your GitHub repo --- My guess is that the README.md would continue to take precedence over README.html, as GH doesn't usually serve HTML files.

@jayhesselberth
Copy link
Collaborator

Also this is a dup of #2361.

But this issue from quarto makes me think the format: gfm strategy should work?

@jayhesselberth
Copy link
Collaborator

I also wonder if there are other features we can access using a README.qmd document with format: gfm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants