Website headings have no anchor links (the Quarto 1 hover link icon)

Đang mở
#1,058 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@cscheid đang làm issue này rồi.

Từ ngày 5/11/2026.

  • #1061 của @cscheid — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
56/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
frontend

Hướng nghiên cứu

Start by tracing how q2 renders website headings and assembles page scripts; the issue points to Quarto 1’s quarto-html-after-body.ejs, quarto.js, and anchor.js as reference points. Reproduce with q2 render and inspect the rendered page’s heading and script tags. Done means hovering over headings shows a link icon that lets readers copy a section link.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

In a q2 website, section headings are not clickable. In Quarto 1, a link icon shows when you hover over a heading, so readers can copy a link to that section. In q2, no icon shows.

The sections have IDs, so links such as #events work. The missing part is the hover anchor link. Quarto 1 adds it with anchor.js (from quarto-html-after-body.ejs / quarto.js), and q2 does not load that script.

To reproduce

  1. Render a website that has ## headings: q2 render
  2. Open a page and hover over a heading.

Expected: a link icon shows next to the heading (Quarto 1 behavior).
Actual: no icon shows, and the heading is not a link.

Rendered output, for reference:

<section id="events" class="section level2">
<h2>Events</h2>

There is no anchor script in the page <script> tags.

Environment

  • q2 0.40.0-nightly.20261104 (compared with Quarto 1.10.18)
  • macOS
  • Found in a Quarto 2 port of the Posit Assistant docs, using the posit-dev/product-doc-theme@q2 extension
Ngôn ngữ chính
Rust
Star
293
Fork
20
Merge trung bình
12 giờ 21 phút
Pull request đã merge (30 ngày)
178

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của quarto-dev/q2

Tất cả issue của quarto-dev/q2

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.