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

breadcrumbs only appear if title set in topmatter #10567

Closed
machow opened this issue Aug 20, 2024 · 5 comments · Fixed by #11224
Closed

breadcrumbs only appear if title set in topmatter #10567

machow opened this issue Aug 20, 2024 · 5 comments · Fixed by #11224
Assignees
Labels
books bug Something isn't working html Issues with HTML and related web technology (html/css/scss) websites Issues creating websites
Milestone

Comments

@machow
Copy link

machow commented Aug 20, 2024

Bug description

The docs on breadcrumbs mention they will be displayed by default. It appears that when title: is not set in the top-matter, then they are not displayed.

Note that in this issue I'll refer to three possible meanings of title:

  1. _quarto.yml sidebar text: title
  2. qmd topmatter title
  3. qmd header title

Currently, quarto requires (2) to be set. When this happens, (1) gets shown if set. Otherwise, (2) gets shown.

Steps to reproduce

_quarto.qmd

project:
  type: website

website:
  sidebar:
    - contents:
      - section: "Tutorials"
        contents:
          - text: Tutorial sidebar title
            href: tutorials.qmd

tutorial.qmd

---
# uncomment below to see breadcrumbs say "Tutorial sidebar title"
# title: Tutorial topmatter title
---

# Tutorial qmd first header

abc

Expected behavior

breacrumb for tutorial page should say "Tutorial sidebar title".

Actual behavior

No breadcrumb shown

Your environment

mac osx

Quarto check output

Quarto 1.5.56
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.5.56
      Path: /Applications/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.9.5
      Path: /Users/machow/.pyenv/versions/3.9.5/bin/python3
      Jupyter: 5.3.1
      Kernels: <removed>

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

[✓] Checking R installation...........OK
      Version: 4.1.2
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library
      knitr: 1.39
      rmarkdown: 2.14

[✓] Checking Knitr engine render......OK
@machow machow added the bug Something isn't working label Aug 20, 2024
@cscheid cscheid self-assigned this Aug 21, 2024
@cscheid cscheid added this to the v1.6 milestone Aug 21, 2024
@cscheid
Copy link
Collaborator

cscheid commented Aug 21, 2024

Thanks. We've had similar bugs in the past, so this tracks.

Can you just confirm to me that you're not using both title: and a Header of level 1? It's not perfectly clear from your tutorial.qmd.

@mcanouil mcanouil added websites Issues creating websites books html Issues with HTML and related web technology (html/css/scss) labels Aug 21, 2024
@machow
Copy link
Author

machow commented Aug 22, 2024

The example uses both, but I think the bug is that the breadcrumb only works if title: is set. quartodoc unfortunately sets title via the h1 header (#), but I'm guessing that will need to change as a separate quartodoc issue 😭

@mcanouil
Copy link
Collaborator

mcanouil commented Aug 22, 2024

@machow As a side note, I think quartodoc should set title as it is safer and more reliable in Quarto. h1 are no title by default. Quarto promotes the first header to title in some conditions/context.

@machow
Copy link
Author

machow commented Aug 26, 2024

That makes sense, and I'll switch it over!

@cscheid
Copy link
Collaborator

cscheid commented Oct 28, 2024

Quarto's HTML is itself not identical depending on whether the title is specified on title: vs on an H1 header. That's a Quarto bug by itself, and it seems to be the cause of this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
books bug Something isn't working html Issues with HTML and related web technology (html/css/scss) websites Issues creating websites
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants