From ca885027d4309f52af28d15402b662e3edfa2d83 Mon Sep 17 00:00:00 2001 From: saurabhg772244 Date: Thu, 10 Oct 2024 14:15:16 +0530 Subject: [PATCH] Moved position for icon config and added major version in icon docs --- docs/config/icons.md | 4 ++-- packages/mermaid/src/docs/.vitepress/config.ts | 2 +- packages/mermaid/src/docs/config/icons.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/config/icons.md b/docs/config/icons.md index ef0812b50..729afa1d5 100644 --- a/docs/config/icons.md +++ b/docs/config/icons.md @@ -17,7 +17,7 @@ mermaid.registerIconPacks([ { name: 'logos', loader: () => - fetch('https://unpkg.com/@iconify-json/logos/icons.json').then((res) => res.json()), + fetch('https://unpkg.com/@iconify-json/logos@1/icons.json').then((res) => res.json()), }, ]); ``` @@ -25,7 +25,7 @@ mermaid.registerIconPacks([ Using packages and a bundler: ```bash -npm install @iconify-json/logos +npm install @iconify-json/logos@1 ``` With lazy loading diff --git a/packages/mermaid/src/docs/.vitepress/config.ts b/packages/mermaid/src/docs/.vitepress/config.ts index 23d8a21bb..4dec8231f 100644 --- a/packages/mermaid/src/docs/.vitepress/config.ts +++ b/packages/mermaid/src/docs/.vitepress/config.ts @@ -174,13 +174,13 @@ function sidebarConfig() { { text: 'API-Usage', link: '/config/usage' }, { text: 'Mermaid API Configuration', link: '/config/setup/README' }, { text: 'Mermaid Configuration Options', link: '/config/schema-docs/config' }, + { text: 'Registering icons', link: '/config/icons' }, { text: 'Directives', link: '/config/directives' }, { text: 'Theming', link: '/config/theming' }, { text: 'Math', link: '/config/math' }, { text: 'Accessibility', link: '/config/accessibility' }, { text: 'Mermaid CLI', link: '/config/mermaidCLI' }, { text: 'FAQ', link: '/config/faq' }, - { text: 'Registering icons', link: '/config/icons' }, ], }, ]; diff --git a/packages/mermaid/src/docs/config/icons.md b/packages/mermaid/src/docs/config/icons.md index d5d296281..db079f841 100644 --- a/packages/mermaid/src/docs/config/icons.md +++ b/packages/mermaid/src/docs/config/icons.md @@ -11,7 +11,7 @@ mermaid.registerIconPacks([ { name: 'logos', loader: () => - fetch('https://unpkg.com/@iconify-json/logos/icons.json').then((res) => res.json()), + fetch('https://unpkg.com/@iconify-json/logos@1/icons.json').then((res) => res.json()), }, ]); ``` @@ -19,7 +19,7 @@ mermaid.registerIconPacks([ Using packages and a bundler: ```bash -npm install @iconify-json/logos +npm install @iconify-json/logos@1 ``` With lazy loading