Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions docs/.npmrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# VitePress + vitepress-plugin-mermaid force mermaid's transitive deps
# (cytoscape, dayjs, @braintree/sanitize-url, ...) into Vite's optimizeDeps.
# pnpm's default isolated node_modules does not hoist them to the top level,
# so the dev server fails to pre-bundle and renders a blank page. Flatten the
# docs package's node_modules so Vite can resolve them. Dev-tooling only.
shamefully-hoist=true
# (cytoscape, dayjs, @braintree/sanitize-url, …) into Vite's optimizeDeps, but
# pnpm's isolated node_modules does not expose them at the top level, so the dev
# server fails to pre-bundle them and renders a blank page.
#
# Hoist ONLY those specific deps. Do NOT use `shamefully-hoist=true`: hoisting
# everything shadows VitePress's @vue/* packages with mismatched copies, which
# breaks SSR template compilation and ships raw `{{ }}` in the built HTML.
public-hoist-pattern[]=*cytoscape*
public-hoist-pattern[]=dayjs
public-hoist-pattern[]=@braintree/sanitize-url
24 changes: 15 additions & 9 deletions docs/.vitepress/config/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,21 @@ export const shared: UserConfig = {
'zh/README.md': 'zh/index.md',
},

// The reused docs contain literal mustache examples in inline code
// (e.g. `${{src.service_id}}` in fields_mapping). Move Vue's delimiters to
// unused tokens so `{{ }}` renders literally — no source edits, GitHub
// rendering preserved.
vue: {
template: {
compilerOptions: {
delimiters: ['__vp_no_interp_open__', '__vp_no_interp_close__'],
},
// The reused docs use literal `{{ }}` inside inline code (e.g.
// `${{src.service_id}}`). Vue would treat those as interpolation and break the
// build. Entity-escape braces in inline code only, so they render literally —
// without changing Vue's global delimiters (which breaks the theme's own
// `{{ }}`) and without editing the source docs. GitHub rendering is unaffected.
markdown: {
config: (md) => {
md.renderer.rules.code_inline = (tokens, idx, _options, _env, self) => {
const token = tokens[idx]
const content = md.utils
.escapeHtml(token.content)
.replace(/{/g, '{')
.replace(/}/g, '}')
return `<code${self.renderAttrs(token)}>${content}</code>`
}
},
},

Expand Down
2 changes: 1 addition & 1 deletion docs/public/openumodel-mark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading