fix(docs): restore theme interpolation + transparent logo on the docs site#49
Merged
Conversation
The docs landing page shipped raw `{{ site.title }}` / `{{ text }}` /
`{{ translate('button.buttonText') }}` in the built HTML — the default theme's
interpolation was not rendering.
Cause: shared.ts globally overrode Vue's template delimiters to stop the docs'
literal `${{src.service_id}}` examples from interpolating, which also disabled
the theme's own `{{ }}`. (Dev uses prebuilt theme assets, so it surfaced only in
the build/deploy.) Replace the global override with a targeted markdown rule that
entity-escapes braces in inline code only: theme renders, the `${{ }}` examples
stay literal, source docs + GitHub rendering unchanged. This also fixes clicking
the site title not returning home (the link was always /UnifiedModel/).
- docs/.vitepress/config/shared.ts: drop vue.compilerOptions.delimiters; add a
markdown code_inline brace-escape rule.
- docs/public/openumodel-mark.svg: chroma-key the baked white background to
transparent (the blue U is unchanged).
- docs/.npmrc: replace shamefully-hoist with a targeted public-hoist-pattern for
mermaid's deps (no over-hoisting).
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.
What
Fixes three issues on the docs landing page (all introduced in the initial docs-site PR).
1. Raw
{{ }}in the built page (the big one)The production build shipped literal
{{ site.title }},{{ text }},{{ translate('button.buttonText') }}etc. in the HTML — the default theme's own interpolation wasn't rendering.Cause:
shared.tsglobally overrode Vue's template delimiters (vue.template.compilerOptions.delimiters) so the docs' literal${{src.service_id}}examples wouldn't interpolate — but that also disabled the theme's{{ }}. (Dev used prebuilt theme assets, so it only showed in the build/deploy.)Fix: drop the global delimiter override; instead a targeted markdown rule entity-escapes braces in inline code only. The theme interpolates normally, the
${{ }}examples stay literal, and neither the source docs nor GitHub rendering change.This also resolves clicking the site title not returning home — the title link was always
/UnifiedModel/; the home page just rendered broken.2. Logo background not transparent
openumodel-mark.svgwrapped a PNG with a baked-in opaque white background (0% transparent pixels). Chroma-keyed the white to transparent; the blue U (and its gradient) is untouched (verified opaque on all strokes).3. pnpm hoist hardening
Replaced
shamefully-hoist=truewith a targetedpublic-hoist-patternfor mermaid's transitive deps only — same dev fix without over-hoisting the whole tree.Verification
pnpm -C docs buildclean — 0{{ }}in the builtindex.html; nav shows "UModel", search shows "Search", hero buttons render.${{src.service_id}}renders literally on the concepts page (entity-escaped); build no longer fails on it.alpha=0, strokes opaque blue; favicon/logo/hero all build.