Manuscript projects should support repo-url and repo-actions like book/website projects
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 74/100
Hướng nghiên cứu
Bắt đầu trong share/schema/definitions.yml bằng cách so sánh manuscript-schema với book-schema và cơ chế kế thừa base-website của nó. Tái hiện cấu hình dự án manuscript từ issue, sau đó render HTML và xác minh rằng repo-actions tạo ra các liên kết .toc-actions cùng biểu tượng navbar của GitHub. Hoàn tất khi các thiết lập repo-url và repo-actions được ghi trong tài liệu hoạt động cho các dự án manuscript mà không cần workaround.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
book and website project types support repo-url and repo-actions out of the box, injecting "Edit this page" / "View source" links into the TOC sidebar and allowing a GitHub icon in the navbar. Manuscript projects do not — the manuscript-schema is declared closed: true with no inheritance from base-website, so these keys are silently ignored even when set in _quarto.yml.
Reproduction
Create a manuscript project (project: type: manuscript) and add:
website:
repo-url: https://github.com/owner/repo
repo-actions: [edit, source]
or under format: html::
format:
html:
repo-url: https://github.com/owner/repo
repo-actions: [edit, source]
Neither produces the expected TOC action links or GitHub navbar icon in the rendered HTML.
Expected behavior
Manuscript HTML output should respect repo-url and repo-actions the same way book and website projects do, injecting .toc-actions links ("Edit this page", "View source") into the TOC sidebar.
Workaround
A Lua filter can replicate the behavior by reading repo-url/repo-actions from document metadata and injecting the links via inline JavaScript:
-- reads repo-url and repo-actions from _quarto.yml metadata,
-- injects .toc-actions div and GitHub icon via JS
function Pandoc(doc)
if not FORMAT:match("html") then return doc end
-- ... inject <script> that appends .toc-actions to nav#TOC
end
Full example: https://github.com/d-morrison/qmt/blob/main/_repo-links.lua
Root cause (schema)
In share/schema/definitions.yml:
book-schemahassuper: resolveRef: base-website→ inheritsrepo-url,repo-actions,navbar, etc.manuscript-schemahasclosed: truewith nosuper→ none of those keys are recognized.
The fix would be to add super: resolveRef: base-website to manuscript-schema, or to selectively expose repo-url and repo-actions in the manuscript schema.
Environment
- Quarto version: 1.9.36
- OS: macOS 14
- Ngôn ngữ chính
- JavaScript
- Star
- 6k
- Fork
- 458
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 42
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
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
quarto-dev/quarto-cli#14915 ·
-
binder bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
quarto-dev/quarto-cli#14907 · 3 bình luận · 1 reaction ·
-
brand bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
quarto-dev/quarto-cli#14891 ·
-
brand bug html revealjs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
quarto-dev/quarto-cli#14882 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
quarto-dev/quarto-cli#14875 ·
Tất cả issue của quarto-dev/quarto-cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Daemon passes --experimental-wasm-jspi unconditionally on Node >= 24; Node 26 rejects the flag Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Automattic/studio#4908 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
sugarlabs/musicblocks#8847 ·