Skip to content

fix(docs): restore theme interpolation + transparent logo on the docs site#49

Merged
qiansheng91 merged 1 commit into
mainfrom
codex/fix-docs-rendering
Jun 15, 2026
Merged

fix(docs): restore theme interpolation + transparent logo on the docs site#49
qiansheng91 merged 1 commit into
mainfrom
codex/fix-docs-rendering

Conversation

@qiansheng91

Copy link
Copy Markdown
Collaborator

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.ts globally 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.svg wrapped 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=true with a targeted public-hoist-pattern for mermaid's transitive deps only — same dev fix without over-hoisting the whole tree.

Verification

  • pnpm -C docs build clean — 0 {{ }} in the built index.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.
  • Logo: corners alpha=0, strokes opaque blue; favicon/logo/hero all build.

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).
@qiansheng91 qiansheng91 added documentation Improvements or additions to documentation bug Something isn't working labels Jun 15, 2026
@qiansheng91 qiansheng91 merged commit e89f3d5 into main Jun 15, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant