quarto-dev / quarto-dev/quarto-cli

Website Breadcrumbs is misleading when same document is used in multiple sections in sidebar

Open
#12,985 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement websites
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Reported by @ashleyhenry15 on a bigger webs
Demo website to reproduce: https://github.com/cderv/debug-website-sidebar-breadcrumbs/tree/main

When the same file is used in two places in sidebar section like

  sidebar:
  - id: admin-guide
    collapse-level: 1
    contents:
      - text: "Introduction"
        href: admin/index.qmd
      - text: "---"
      - section: "SmartWidget Pro"
        contents:
          - text: "Overview"
            href: admin/smartwidget/overview.qmd
          - admin/integrations/api_guide.qmd
      - section: "CRM Connect"
        contents:
          - text: "Overview"
            href: admin/crm/overview.qmd
          - admin/integrations/api_guide.qmd

The link of the second will send to the first page. This is a about breadscrumbs et page content

Gif showing the problem of clicking on second api guide section under CRM section, linking to the first one under Smartwidget

This is definitely misleading to users, but I don't know if we could share the same page and have the breadcrumbs and highlighted sidebar part updated correctly.

I wonder if this should be two documents instead, for different HTML in output, and each would use same include 🤔
This could be a workaroudn

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked demo website to reproduce the breadcrumb and sidebar behavior when admin/integrations/api_guide.qmd appears in both sections. Done means selecting the second API guide opens the intended context and updates the breadcrumbs and highlighted sidebar entry correctly.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.