Repository navigation
Adding href to a sidebar section breaks Markdown formatting #14520
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingwebsitesIssues creating websitesIssues creating websites
Description
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
For the sidebar of a website, a section without an href acts as a collapsible menu which supports Markdown formatting like bold:
- section: "**More info**"
contents:
- href: about.qmdYou can also add an href, and then clicking on that section brings you to that page:
- section: "**More info**"
href: more-info.qmd
contents:
- href: about.qmdHowever, adding an href breaks the Markdown formatting of the section. The example above would render as "**More info**", instead of "More info". For example:
HTML formatting still works however:
- section: "<b>More info</b>"
href: more-info.qmd
contents:
- href: about.qmdUnlike the Markdown example, the example above renders correctly as "More info".
A fix is proposed in #14521.
Steps to reproduce
Put all of the files in a folder and then do quarto render:
_quarto.yaml
project:
type: website
website:
title: "My Quarto Website"
sidebar:
contents:
- href: index.qmd
text: Home
- section: "**More info**"
href: more-info.qmd # comment to hide bug
contents:
- href: about.qmd
format:
html:
toc: trueindex.qmd
---
title: "Sidebar demo"
---
## Welcome
Demo of issue with sidebar render
### Sections
- Visit our [About](about.qmd) page
- Get in [Contact](contact.qmd)more-info.qmd
---
title: "More info"
---
## More info
This section contains additional information about us.
- [About](about.qmd)about.qmd
---
title: "About"
---
## About Us
Lorem ipsumActual behavior
Markdown formatting is rendered as plain text in sidebar sections when an href is used.
Expected behavior
Markdown formatting is preserved in sidebar sections when an href is used.
Your environment
- IDE: any (VS Code / Sublime / Positron)
- OS: Ubuntu 24.04
Quarto check output
Quarto 1.9.37
[✓] Checking environment information...
Quarto cache location: /home/cliffk/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.8.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.4.5: OK
Typst version 0.14.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.9.37
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
Chrome Headless Shell: (not installed)
VeraPDF: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/bin
Version: 2023
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /usr/bin/google-chrome
Source: PATH
[✓] Checking basic markdown render....OK
[✓] Checking R installation...........OK
Version: 4.6.0
Path: /usr/lib/R
LibPaths:
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: 1.48
rmarkdown: (None)
The rmarkdown package is not available in this R installation.
Install with install.packages("rmarkdown")
[✓] Checking Python 3 installation....OK
Version: 3.13.9 (Conda)
Path: /software/conda/bin/python
Jupyter: 5.8.1
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking Julia installation...Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingwebsitesIssues creating websitesIssues creating websites
Activity
[-]Adding an href to a website sidebar section breaks Markdown but not HTML formatting[/-][+]Adding href to a sidebar section breaks Markdown formatting[/+]Add test to confirm rendering of Markdown in section with href (quart…