quarto-dev / quarto-dev/quarto-cli

Using sort-ui sorting by "Title" sorts by file name (Quarto Website)

Open
#10,398 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Bug description

Given a listing generated by glob-matching files, and sort-ui enabled on the listing, using the UI to sort by "title" sorts the listing by file names instead.

Steps to reproduce

Initiate a quarto website project with the following directory structure:

index.qmd
pages/
- p1.qmd
- p2.qmd
- p3.qmd

With the following file contents:
index.qmd:

---
title: "quarto-sorting-repr"

listing:
    sort-ui: true
    sort: title
    fields: [date, title]
    contents:
        - pages/**.qmd
---

pages/p1.qmd:

---
title: C
---

File p1

pages/p2.qmd:

---
title: A
---

File p2

pages/p3.qmd:

---
title: B
---

File p3

Build the website and navigate to the main page. In the sorting interface, select "Title"

Expected behavior

The listing should be ordered by the titles of each document, that is A, B, C

Actual behavior

The listing order becomes C, A, B.

This seems to correspond to file name order (p1.qmd, p2.qmd, p3.qmd)

Your environment

IDE: VSCode
Version: 1.91.1 (user setup)
Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
Date: 2024-07-09T22:06:49.809Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.19045

Quarto check output
Quarto 1.4.550
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: OK
      Dart Sass version 1.69.5: OK
      Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.550
      Path: /opt/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.12.4 (Conda)
      Path: /home/yuriy/miniconda3/bin/python
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with conda install jupyter

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

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 supplied Quarto website structure and listing configuration, focusing on the sort-ui Title control and the generated listing. Compare the selected Title ordering with the document metadata titles, and consider the issue done when the listing displays A, B, C rather than the file-name order.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.