quarto-dev / quarto-dev/quarto-cli
sidebar: contents: auto incorrect ordering
Nobody has claimed this yet.
- 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.
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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