mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
34 lines
15 KiB
JavaScript
34 lines
15 KiB
JavaScript
import{$ as e,B as t,P as n,_ as r,f as i,g as a,h as o,l as s}from"./runtime-core.esm-bundler-CZvn3YaB.js";import{t as c}from"./plugin-vue_export-helper-CxTVcLa7.js";var l=JSON.parse(`{"path":"/guide/chart/markmap/","title":"markmap | 指南","lang":"zh-CN","frontmatter":{"title":"markmap","icon":"ri:mind-map","createTime":"2025/03/01 14:35:59","permalink":"/guide/chart/markmap/","description":"概述 主题支持在 文章中 嵌入由 markmap 。 该功能由 @vuepress/plugin-markdown-chart 提供支持。 配置 主题默认不启用该功能。 你需要在你的项目中安装 markmap-lib, markmap-toolbar and markmap-view: 然后在 .vuepress/config.ts 配置文件中,启用该...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"markmap\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-10-07T15:13:09.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://theme-plume.vuejs.press/guide/chart/markmap/"}],["meta",{"property":"og:site_name","content":"Plume 主题"}],["meta",{"property":"og:title","content":"markmap"}],["meta",{"property":"og:description","content":"概述 主题支持在 文章中 嵌入由 markmap 。 该功能由 @vuepress/plugin-markdown-chart 提供支持。 配置 主题默认不启用该功能。 你需要在你的项目中安装 markmap-lib, markmap-toolbar and markmap-view: 然后在 .vuepress/config.ts 配置文件中,启用该..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-10-07T15:13:09.000Z"}],["meta",{"property":"article:modified_time","content":"2025-10-07T15:13:09.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://theme-plume.vuejs.press/en/guide/chart/markmap/"}]]},"readingTime":{"minutes":0.82,"words":247},"git":{"createdTime":1740886005000,"updatedTime":1759849989000,"contributors":[{"name":"pengzhanbo","username":"pengzhanbo","email":"volodymyr@foxmail.com","commits":4,"avatar":"https://avatars.githubusercontent.com/pengzhanbo?v=4","url":"https://github.com/pengzhanbo"}],"changelog":[{"hash":"4d2361a7046214fe0f4e4af01831107fd00e38ad","time":1759849989000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"feat(theme)!: add collections support (#704)"},{"hash":"338334f4796d04801b3175fbd633128905b73ce5","time":1750330126000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"feat!: use new chart plugin and remove md-enhance (#621)"},{"hash":"0fd6cac57412002f4d72dc10378789b529adc357","time":1742063370000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"refactor(theme): improve types and flat config (#524)"},{"hash":"6e6f9af12cfa52770de67ee966bd15b37c3256dc","time":1740886005000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"docs: improve docs (#509)"}]},"autoDesc":true,"filePathRelative":"guide/chart/markmap.md","headers":[],"bulletin":false}`),u={name:`markmap.md`},d={class:`code-block-title`,"data-title":`.vuepress/config.ts`},f={class:`code-block-title-bar`},p={class:`title`};function m(c,l,u,m,h,g){let _=t(`VPIcon`),v=t(`CodeTabs`),y=t(`MarkMap`),b=t(`VPDemoBasic`);return n(),i(`div`,null,[l[9]||=o(`<h2 id="概述" tabindex="-1"><a class="header-anchor" href="#概述"><span>概述</span></a></h2><p>主题支持在 文章中 嵌入由 <a href="https://markmap.js.org/" target="_blank" rel="noopener noreferrer">markmap</a> 。</p><p>该功能由 <a href="https://ecosystem.vuejs.press/plugins/markdown/markdown-chart/" target="_blank" rel="noopener noreferrer">@vuepress/plugin-markdown-chart</a> 提供支持。</p><h2 id="配置" tabindex="-1"><a class="header-anchor" href="#配置"><span>配置</span></a></h2><p>主题默认不启用该功能。</p><p>你需要在你的项目中安装 <code>markmap-lib</code>, <code>markmap-toolbar</code> and <code>markmap-view</code>:</p>`,6),r(v,{id:`0`,data:[{id:`pnpm`},{id:`yarn`},{id:`npm`}],"tab-id":`npm-to-pnpm-yarn-npm`},{title0:e(({value:e,isActive:t})=>[r(_,{provider:`iconify`,name:`vscode-icons:file-type-light-pnpm`}),l[0]||=s(`span`,null,`pnpm`,-1)]),title1:e(({value:e,isActive:t})=>[r(_,{provider:`iconify`,name:`vscode-icons:file-type-yarn`}),l[1]||=s(`span`,null,`yarn`,-1)]),title2:e(({value:e,isActive:t})=>[r(_,{provider:`iconify`,name:`logos:npm-icon`}),l[2]||=s(`span`,null,`npm`,-1)]),tab0:e(({value:e,isActive:t})=>[...l[3]||=[s(`div`,{class:`language-sh`,"data-highlighter":`shiki`,"data-ext":`sh`,style:{"--shiki-light":`#393a34`,"--shiki-dark":`#dbd7caee`,"--shiki-light-bg":`#ffffff`,"--shiki-dark-bg":`#121212`}},[s(`pre`,{class:`shiki shiki-themes vitesse-light vitesse-dark vp-code`},[s(`code`,{class:`language-sh`},[s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#59873A`,"--shiki-dark":`#80A665`}},`pnpm`),s(`span`,{style:{"--shiki-light":`#B56959`,"--shiki-dark":`#C98A7D`}},` add`),s(`span`,{style:{"--shiki-light":`#B56959`,"--shiki-dark":`#C98A7D`}},` markmap-lib`),s(`span`,{style:{"--shiki-light":`#B56959`,"--shiki-dark":`#C98A7D`}},` markmap-toolbar`),s(`span`,{style:{"--shiki-light":`#B56959`,"--shiki-dark":`#C98A7D`}},` markmap-view`)])])])],-1)]]),tab1:e(({value:e,isActive:t})=>[...l[4]||=[s(`div`,{class:`language-sh`,"data-highlighter":`shiki`,"data-ext":`sh`,style:{"--shiki-light":`#393a34`,"--shiki-dark":`#dbd7caee`,"--shiki-light-bg":`#ffffff`,"--shiki-dark-bg":`#121212`}},[s(`pre`,{class:`shiki shiki-themes vitesse-light vitesse-dark vp-code`},[s(`code`,{class:`language-sh`},[s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#59873A`,"--shiki-dark":`#80A665`}},`yarn`),s(`span`,{style:{"--shiki-light":`#B56959`,"--shiki-dark":`#C98A7D`}},` add`),s(`span`,{style:{"--shiki-light":`#B56959`,"--shiki-dark":`#C98A7D`}},` markmap-lib`),s(`span`,{style:{"--shiki-light":`#B56959`,"--shiki-dark":`#C98A7D`}},` markmap-toolbar`),s(`span`,{style:{"--shiki-light":`#B56959`,"--shiki-dark":`#C98A7D`}},` markmap-view`)])])])],-1)]]),tab2:e(({value:e,isActive:t})=>[...l[5]||=[s(`div`,{class:`language-sh`,"data-highlighter":`shiki`,"data-ext":`sh`,style:{"--shiki-light":`#393a34`,"--shiki-dark":`#dbd7caee`,"--shiki-light-bg":`#ffffff`,"--shiki-dark-bg":`#121212`}},[s(`pre`,{class:`shiki shiki-themes vitesse-light vitesse-dark vp-code`},[s(`code`,{class:`language-sh`},[s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#59873A`,"--shiki-dark":`#80A665`}},`npm`),s(`span`,{style:{"--shiki-light":`#B56959`,"--shiki-dark":`#C98A7D`}},` i`),s(`span`,{style:{"--shiki-light":`#B56959`,"--shiki-dark":`#C98A7D`}},` markmap-lib`),s(`span`,{style:{"--shiki-light":`#B56959`,"--shiki-dark":`#C98A7D`}},` markmap-toolbar`),s(`span`,{style:{"--shiki-light":`#B56959`,"--shiki-dark":`#C98A7D`}},` markmap-view`)])])])],-1)]]),_:1}),l[10]||=s(`p`,null,[a(`然后在 `),s(`code`,null,`.vuepress/config.ts`),a(` 配置文件中,启用该功能:`)],-1),s(`div`,d,[s(`div`,f,[s(`span`,p,[r(_,{provider:`iconify`,name:`vscode-icons:file-type-typescript`}),l[6]||=a(`.vuepress/config.ts`,-1)])]),l[7]||=o(`<div class="language-ts" data-highlighter="shiki" data-ext="ts" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark has-diff vp-code"><code class="language-ts"><span class="line"><span style="--shiki-light:#1E754F;--shiki-dark:#4D9375;">export</span><span style="--shiki-light:#1E754F;--shiki-dark:#4D9375;"> default</span><span style="--shiki-light:#59873A;--shiki-dark:#80A665;"> defineUserConfig</span><span style="--shiki-light:#999999;--shiki-dark:#666666;">({</span></span>
|
|
<span class="line"><span style="--shiki-light:#998418;--shiki-dark:#B8A965;"> theme</span><span style="--shiki-light:#999999;--shiki-dark:#666666;">: </span><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">plumeTheme</span><span style="--shiki-light:#999999;--shiki-dark:#666666;">({</span></span>
|
|
<span class="line"><span style="--shiki-light:#998418;--shiki-dark:#B8A965;"> markdown</span><span style="--shiki-light:#999999;--shiki-dark:#666666;">: {</span></span>
|
|
<span class="line diff add"><span style="--shiki-light:#998418;--shiki-dark:#B8A965;"> markmap</span><span style="--shiki-light:#999999;--shiki-dark:#666666;">: </span><span style="--shiki-light:#1E754F;--shiki-dark:#4D9375;">true</span><span style="--shiki-light:#999999;--shiki-dark:#666666;">, </span></span>
|
|
<span class="line"><span style="--shiki-light:#999999;--shiki-dark:#666666;"> },</span></span>
|
|
<span class="line"><span style="--shiki-light:#999999;--shiki-dark:#666666;"> })</span></span>
|
|
<span class="line"><span style="--shiki-light:#999999;--shiki-dark:#666666;">})</span></span></code></pre></div>`,1)]),l[11]||=o('<div class="hint-container note"><p class="hint-container-title">注</p><p>以下文档 Fork 自 <a href="https://ecosystem.vuejs.press/plugins/markdown/markdown-chart/markmap.html" target="_blank" rel="noopener noreferrer">@vuepress/plugin-markdown-chart</a>, 遵循 <a href="https://github.com/vuepress/ecosystem/blob/main/LICENSE" target="_blank" rel="noopener noreferrer">MIT</a> 许可证。</p></div><h2 id="语法" tabindex="-1"><a class="header-anchor" href="#语法"><span>语法</span></a></h2><div class="language-md" data-highlighter="shiki" data-ext="md" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-md"><span class="line"><span style="--shiki-light:#999999;--shiki-dark:#666666;">```</span><span style="--shiki-light:#393A34;--shiki-dark:#DBD7CAEE;">markmap</span></span>\n<span class="line"><span style="--shiki-light:#393A34;--shiki-dark:#DBD7CAEE;"><!-- 在这里放置内容 --></span></span>\n<span class="line"><span style="--shiki-light:#999999;--shiki-dark:#666666;">```</span></span></code></pre></div><p>支持通过 Frontmatter 语法进行配置。</p><h2 id="案例" tabindex="-1"><a class="header-anchor" href="#案例"><span>案例</span></a></h2>',5),r(b,{type:`markdown`,title:`markmap`},{code:e(()=>[...l[8]||=[s(`div`,{class:`language-md line-numbers-mode`,"data-highlighter":`shiki`,"data-ext":`md`,style:{"--shiki-light":`#393a34`,"--shiki-dark":`#dbd7caee`,"--shiki-light-bg":`#ffffff`,"--shiki-dark-bg":`#121212`}},[s(`pre`,{class:`shiki shiki-themes vitesse-light vitesse-dark vp-code`},[s(`code`,{class:`language-md`},[s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#999999`,"--shiki-dark":`#666666`}},"````"),s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},`markmap`)]),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},`---`)]),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},`markmap:`)]),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},` colorFreezeLevel: 2`)]),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},`---`)]),a(`
|
|
`),s(`span`,{class:`line`}),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},`# markmap`)]),a(`
|
|
`),s(`span`,{class:`line`}),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},`## 链接`)]),a(`
|
|
`),s(`span`,{class:`line`}),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},`- <https://markmap.js.org/>`)]),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},`- [GitHub](https://github.com/markmap/markmap)`)]),a(`
|
|
`),s(`span`,{class:`line`}),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},`## 功能`)]),a(`
|
|
`),s(`span`,{class:`line`}),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},`- 链接`)]),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},`- **强调** ~~删除线~~ *斜体* ==高亮==`)]),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},`- 多行`)]),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},` 文字`)]),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},"- `行内代码`")]),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},`-`)]),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}}," ```js")]),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},` console.log('code block');`)]),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}}," ```")]),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},`- Katex`)]),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},` - $x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}$`)]),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#393A34`,"--shiki-dark":`#DBD7CAEE`}},"- 现在我们可以通过 `maxWidth` 选项自动换行非常非常非常非常非常非常非常非常非常非常长的内容")]),a(`
|
|
`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-light":`#999999`,"--shiki-dark":`#666666`}},"````")])])]),s(`div`,{class:`line-numbers`,"aria-hidden":`true`,style:{"counter-reset":`line-number 0`}},[s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`}),s(`div`,{class:`line-number`})])],-1)]]),default:e(()=>[r(y,{content:`eJydj81OwkAQx+99ikk0UZssJMQTWo9qoncPoumHG0BbF9tKiASCQQWJYgwRlaCCQkL8QI58iLxMt7Rv4ULgBbzszsz/N/+ZQQhxmqQfaFLEzwEoRCX6qo7xCd7EUaz6wceNEG4GJhQLZ8At/Nr5OschWA6ZZsTwe70T2bNveIge9K4wbXstbK4fyzvzUyYYNkPHskch2hSf/gtjW5p7cdL9ke1kAAKepz9dp5XmeUgmabbiPtaG3UEyCbxdLFv9Ag+C4H48WN2mIDCc1kpO9YodYhcz9OueVUSW04tzq/c2rJyKHGIagCiK+8Y4UsihQVTsUUlwfk4hexhklSgHcwtLU5B5bEgmjrEcwWwMBIgjGQIRDQLGkW7G5V0fWpSUBARIFOvgkxKzrGWYb9Fyw87eWr1PevNt9epuquQMMiBqUmwrvGeGRHBTl26142Teaa5hX7+yRd2nZ9pu//O9GwxLZ+xU2uxwf2vm1oQ=`})]),_:1})])}var h=c(u,[[`render`,m]]);export{l as _pageData,h as default}; |