quarto-dev / quarto-dev/quarto-cli

sidebar: contents: auto incorrect ordering

Open
#9,127 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Bug description

Given a project with listings having directory structure and titles derived from dates, contents: auto incorrectly orders the sidebar contents.

Steps to reproduce

Given a directory structure:

_quarto.yml
index.qmd
things/2024-03-04/index.qmd
things/2024-03-11/index.qmd
things/2024-03-18/index.qmd

The quarto.yml

project:
  type: website

website:
  title: "things"
  sidebar:
    contents: auto

The index.qmd

---
title: all things
listing:
  contents: "./things/*/index.qmd"
  sort: "title asc"
  type: table
---

Each of the things/YYYY-MM-DD/index.qmd files looks like:

---
title: Thing 2024-03-04
---
Expected behavior

The sidebar listing order should show a reversed version of the embedded listing table, where titles are listed in ascending order.

Actual behavior

The sidebar listing order is in some other (arbitrary?) order.

image
Your environment

Tested with Quarto 1.4.549 and Quarto 1.5.24.

Quarto check output
Quarto 1.5.24
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.5.24
      Path: /Users/aron/Downloads/quarto-1.5.24-macos/bin

[✓] Checking tools....................OK
      TinyTeX: (external install)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/aron/Library/TinyTeX/bin/universal-darwin
      Version: 2022

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

[✓] Checking Python 3 installation....OK
      Version: 3.12.2
      Path: /usr/local/opt/python@3.12/bin/python3.12
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
      Version: 4.3.1
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library
      knitr: 1.45
      rmarkdown: 2.25

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

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

Reproduce the issue with the shown _quarto.yml, index.qmd, and dated things/*/index.qmd files, using contents: auto and the embedded listing sort. Then trace the implementation that builds automatic website sidebar contents and compare its order with the listing table. Done means the sidebar consistently follows the expected reversed listing order.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.