Pages with categories request listings.json, which 404s when the site has no listing
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, typescript
Hướng nghiên cứu
Start with findAndActivateCategories() in quarto.js and updateGlobalListingIndex() in src/project/types/website/listing/website-listing-index.ts; compare the website and standalone rendering paths described in the issue. Check how the script determines whether listings are available and how the index is written. Done means pages with categories and no listings make no failing listings.json request in either case.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
When a page has categories in its title block, quarto.js fetches listings.json to turn the categories into links to a listing (findAndActivateCategories()).
If no listing exists, that file is not there, so every such page makes a request that returns 404 and logs an error in the browser console.
Rendering is not affected, because the script only reads the response when the status is 200.
This happens in two places:
- A website with no listing page.
updateGlobalListingIndex()insrc/project/types/website/listing/website-listing-index.tsonly writeslistings.jsonwhenlistingPaths.length > 0. - A standalone HTML document with
categories. The fetch runs here as well, againstlistings.jsonnext to the document.
For websites, writing listings.json every time (as [] when there are no listings) would remove the 404.
The standalone case would need the script to know whether listings exist before it fetches.
This is mostly cosmetic.
Steps to reproduce
A website with no listing:
# _quarto.yml
project:
type: website
website:
title: "Repro"
---
title: "Home"
categories: [one, two]
---
A page with categories, in a website with no listing.
A standalone document:
---
title: "Standalone"
categories: [one, two]
format: html
---
A standalone document with categories.
Render each one, serve the output over HTTP, open the page and look at the network panel and the console.
Actual behavior
Both pages request listings.json, get a 404, and log Failed to load resource: the server responded with a status of 404 (Not Found) in the console.
Expected behavior
No request for listings.json when there is no listing to link to, and no console error.
Your environment
- OS: macOS 27.0.1.
- Browser: Chromium (Brave), headless.
Quarto check output
Quarto 99.9.9
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.10.0: OK
Dart Sass version 1.101.0: OK
Deno version 2.9.8: OK
Typst version 0.15.1: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 99.9.9
commit: 6f81421488bde28d87cee51c9988e666bc09f7be
- Ngôn ngữ chính
- JavaScript
- Star
- 6.1k
- Fork
- 478
- Merge trung bình
- 17 giờ 7 phút
- Pull request đã merge (30 ngày)
- 112
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của quarto-dev/quarto-cli
-
enhancement websites
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
quarto-dev/quarto-cli#15255 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Website announcement dismiss control cannot be reached or used with a keyboardCó thể đã có người làm @Xander-AJ đã nhận hôm nay. Đang mởaccessibility bug websites
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
quarto-dev/quarto-cli#15235 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
quarto.json.decode does not raise on invalid JSON, so pcall cannot catch itCó thể đã có người làm @sogav21 đã nhận 2 ngày trước. Đang mởbug lua
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
quarto-dev/quarto-cli#15226 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
arrow-dark gives region markers a light band that fails contrastCó thể đã có người làm @vav7 đã nhận 1 ngày trước. Đang mởaccessibility bug themes
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
quarto-dev/quarto-cli#15222 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug code-annotation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
quarto-dev/quarto-cli#15215 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của quarto-dev/quarto-cli
Issue tương tự
-
ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
LucasSantana-Dev/Lucky#2945 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
brijeshb42/monaco-vim#175 ·
-
good first issue
Độ khó 2/5 3-5 ngày Mức phù hợp với người mới 62/100
paipai1999/POS-system#3 ·
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
r-afael/better-yt-recommendations#36 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
microsoft/playwright#43875 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày