Repository navigation
Conversation
…22 illustrations A shared example admitted inline into the page has no <base href> of its own, so "assets/photo.svg" resolved against the page address and returned 404. Before the markup joins the page, references to the example's own assets in attribute values (plain URL, srcset, url() in a style, a path inside a JSON attribute) now point at /_docara/examples/<id>/. Text and paths to files the example does not have stay as written; the source tab still shows what the author wrote. The example component page explains this and adds the documentation illustration rule (SIMAI rule D22): flat SVG from the pinned SIMAI Framework palette, sets, shapes, names, alt text and generate.mjs sync. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zabarov
added a commit
that referenced
this pull request
Nov 17, 2026
…22 illustrations From PR #70 (fix/inline-example-assets-d22). On top: the D22 text says it is a SIMAI documentation rule Docara does not check, and the English page carries the same two parts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Released in Docara 3.17.0 via local main (bb80ec8, plus English page and D22 wording). |
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.
Problem
A shared example (
:::example {id=...}) admitted inline into the page has no<base href>, unlike its frame. A path likeassets/photo.svgin its markup resolved against the page address and returned 404. Consumers worked around it withpreview=sandbox(for example ui-doc's image-field, avatar, file-preview, list-item and property-types gallery examples).Change
InlineExampleAssetRebaser: before inline markup joins the page, references to the example's own asset paths in tag attribute values are rewritten to<base_url>/_docara/examples/<id>/. Covered: plain URL attributes,srcsetlists,url()in a style, paths inside JSON attribute values (including\/-escaped ones),./assets/..., HTML-escaped names, and query or fragment suffixes. Text content, unknown files,../assets/..., absolute and external URLs stay as written.ProjectExampleRepository::load()also returns the example's asset paths.<base href>.components/example.md, ru): a paragraph on how inline examples reachassets/, and a new "Картинки в примерах" subsection with the documentation illustration rule (SIMAI rule D22).Checks
vendor/bin/pint --test: passedvendor/bin/phpunit tests/Unit: 1026 tests passed, 5 skipped. This includes the newInlineExampleAssetRebaserTestandProjectExampleRepositoryTest::an_inline_project_example_points_its_own_assets_at_the_published_folder.docs/site:build productionandverify-static: 491 pages, 0 broken references.🤖 Generated with Claude Code