Repository navigation
Resolve the reveal.js logo and listing leading-/ images in URL space (bd-7328beha, bd-epk8cmdl) - #958
Merged
Conversation
…(bd-7328beha, bd-epk8cmdl) revealjs `logo:` was emitted verbatim into `<img src>`: a project-level logo seen from a subdirectory deck pointed at the wrong file, a leading `/` landed as a host-absolute link, and nothing copied the file into the output tree. `RevealFooterLogoTransform` now resolves the value through `config_paths` (relative to the declaring file; `/` = project root), emits the page-relative URL through the resource resolver and registers a `ResourceCopyIntent` (skipped in VFS-root mode, where the hub serves the file from the VFS). External URLs pass through; a file outside the project is emitted as written. The listing code treated a leading `/` as external (decision 4 of the site-root-relative design says it is the site root): `is_external_src` and `is_remote_src` collapse into one classifier backed by `quarto_util::is_external_url`; `rebase_image_from_dir` anchors `/x` at the project root so relativization, the copy intent and the feed all see one spelling; `host_relative_url` relativizes a rooted src like the bare form; `resolve_preview_url` anchors a sibling's `/x` preview src at the output root instead of passing it through. Tests: unit tests for `resolve_logo` and the listing helpers; integration tests for a project-level, rooted and deck-relative logo on a subdirectory deck, and for a rooted front-matter `image:` on a nested listing host. Docs: the paths guide lists both keys. Design inventory rows marked fixed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #954/#955/#956 (config-path late binding): the two URL-space emitters scoped out of Phase 1.
bd-7328beha — reveal.js
logo:RevealFooterLogoTransformemitted thelogo:string verbatim into<img src>, so a project-level logo seen from a subdirectory deck pointed at the wrong file, a leading/landed as a host-absolute link, and nothing copied the file into the output tree. It now resolves the value throughconfig_paths(relative to the declaring file; leading/= project root), emits the page-relative URL through the resource resolver (page_url_for) and registers aResourceCopyIntent(skipped in VFS-root mode, where the hub serves the file from the VFS — the listing-image rule). External URLs pass through; a file outside the project is emitted as written.bd-epk8cmdl — listing leading-
/sourcesDecision 4 of the site-root-relative design: in URL space a leading
/is the site root, never "external".is_external_src/is_remote_srccollapse into one classifier backed byquarto_util::is_external_url;rebase_image_from_diranchors/xat the project root at hydration so relativization, the copy intent and the feed all see one spelling;host_relative_urlrelativizes a rooted src like the bare form;resolve_preview_urlanchors a sibling's/xpreview src at the output root instead of passing it through.Tests / docs
resolve_logo(deck-relative, rooted, external, blank), listing helpers,resolve_preview_url.config_path_consumers.rs); rooted front-matterimage:on a nested listing host (listing_pipeline.rs).docs/guides/projects/paths.qmdlists both keys; design inventory rows marked fixed.cargo xtask verify --skip-hub-buildgreen locally (WASM rebuilt first). Windows cross-check of quarto-core does not build from macOS (C build scripts); the change usesPathAPIs and forward-slash URL strings only.🤖 Generated with Claude Code