Skip to content

Resolve the reveal.js logo and listing leading-/ images in URL space (bd-7328beha, bd-epk8cmdl) - #958

Merged
cscheid merged 1 commit into
mainfrom
feature/bd-7328beha-url-space-config-paths
Oct 28, 2026
Merged

cscheid merged 1 commit into
mainfrom
feature/bd-7328beha-url-space-config-paths

Conversation

@cscheid

@cscheid cscheid commented Oct 28, 2026

Copy link
Copy Markdown
Member

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:

RevealFooterLogoTransform emitted the logo: 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 through config_paths (relative to the declaring file; leading / = project root), emits the page-relative URL through the resource resolver (page_url_for) and registers a ResourceCopyIntent (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-/ sources

Decision 4 of the site-root-relative design: in URL space a leading / is the site root, never "external". is_external_src/is_remote_src collapse into one classifier backed by quarto_util::is_external_url; rebase_image_from_dir anchors /x at the project root at hydration 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 / docs

  • Unit: resolve_logo (deck-relative, rooted, external, blank), listing helpers, resolve_preview_url.
  • Integration: project-level, rooted and deck-relative logo on a subdirectory deck (config_path_consumers.rs); rooted front-matter image: on a nested listing host (listing_pipeline.rs).
  • docs/guides/projects/paths.qmd lists both keys; design inventory rows marked fixed.

cargo xtask verify --skip-hub-build green locally (WASM rebuilt first). Windows cross-check of quarto-core does not build from macOS (C build scripts); the change uses Path APIs and forward-slash URL strings only.

🤖 Generated with Claude Code

…(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>
@posit-snyk-bot

posit-snyk-bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cscheid
cscheid merged commit dbd7ceb into main Oct 28, 2026
17 checks passed
@cscheid
cscheid deleted the feature/bd-7328beha-url-space-config-paths branch October 28, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants