Don't render the macros submodule's .qmd files directly - #84
Conversation
The `macros` submodule supplies macro definitions for include/shortcode
use, but its index.qmd / macros-table.qmd were being rendered as standalone
site pages. macros-table.qmd uses DT::datatable() (an HTML widget), which
errors under the project's PDF format ("Functions that produce HTML output
found in document targeting pdf output"), breaking Quarto Publish.
Exclude the submodule directory from the project render list (`!macros/`).
The files remain available as resources for includes/shortcodes; they're
just no longer rendered as pages. Nothing in the qwt site links to them.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Claude finished @d-morrison's task in 1m 34s —— View job Code Review — PR #84
Summary: The fix is minimal, targeted, and correct. One minor question about glob specificity; comment is on the verbose side but defensible.
|
There was a problem hiding this comment.
Pull request overview
This PR updates the Quarto website configuration to prevent .qmd files from the macros/ git submodule from being rendered as standalone site pages, avoiding PDF render failures caused by HTML-only output (e.g., DT::datatable()).
Changes:
- Exclude the
macros/submodule directory fromproject.renderin_quarto-website.yml. - Add inline documentation explaining why the submodule is excluded (HTML widget incompatibility with PDF output).
|
Problem
Quarto Publishrendersmacros/index.qmdandmacros/macros-table.qmdfrom themacrosgit submodule as standalone site pages (files 5–6 of 7 in the render).macros-table.qmdusesDT::datatable()(an HTML widget), which errors when the project also renders to PDF:(This surfaced after #82 installed
DTand the render got past the earlierno package called 'DT'error.)Fix
Per the request to not touch the submodule, exclude its directory from the project render list in
_quarto-website.yml:The submodule's files remain available as resources for includes/shortcodes (e.g.
macros-table.qmdstillreadLines("macros.qmd")); they're just no longer rendered as standalone pages. Verified nothing in the qwt site links to themacros/pages, so no broken links.Test plan
macros/index.qmdormacros/macros-table.qmd(render count drops from 7 to 5).Quarto Publishonmaingoes green (the PDF/HTML-widget error can't occur if the file isn't rendered).🤖 Generated with Claude Code