text: (window.webpackJsonp=window.webpackJsonp||[]).push([[3],{136:function(t,e,s){},142:function(t,e,s){"use strict";var a=s(136);s.n(a).a},186:function(t,e,s){"use strict";s.r(e);s(142);var a=s(0),n=Object(a.a)({},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"content"},[t._m(0),t._v(" "),t._m(1),t._v(" "),s("p",[t._v("标题会自动获取锚点链接。可以使用 "),s("router-link",{attrs:{to:"./../config/#markdown-anchor"}},[s("code",[t._v("markdown.anchor")])]),t._v(" 选项来配置锚点的渲染。")],1),t._v(" "),t._m(2),t._v(" "),t._m(3),t._v(" "),t._m(4),t._v(" "),t._m(5),t._v(" "),t._m(6),t._v(" "),s("p",[t._v("如果你想要链接到另一个 markdown 文件，记得：")]),t._v(" "),t._m(7),t._v(" "),t._m(8),t._v(" "),s("p",[t._v("给定以下目录结构：")]),t._v(" "),t._m(9),t._m(10),t._m(11),t._v(" "),t._m(12),t._v(" "),s("ul",[s("li",[s("a",{attrs:{href:"https://vuejs.org",target:"_blank",rel:"noopener noreferrer"}},[t._v("vuejs.org"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://github.com/vuejs/vuepress",target:"_blank",rel:"noopener noreferrer"}},[t._v("VuePress on GitHub"),s("OutboundLink")],1)])]),t._v(" "),s("p",[t._v("你可以自定义通过配置 "),s("router-link",{attrs:{to:"./../config/#markdown-externallinks"}},[t._v("config.markdown.externalLinks")]),t._v(" 来自定义外部链接的特性。")],1),t._v(" "),t._m(13),t._v(" "),s("p",[t._v("提供开箱即用的 "),s("a",{attrs:{href:"https://jekyllrb.com/docs/frontmatter/",target:"_blank",rel:"noopener noreferrer"}},[t._v("YAML front matter"),s("OutboundLink")],1),t._v("：")]),t._v(" "),t._m(14),t._m(15),t._v(" "),t._m(16),t._v(" "),t._m(17),t._m(18),t._v(" "),s("p",[t._v("除了 YAML，VuePress 也支持 JSON 或者 "),s("a",{attrs:{href:"https://github.com/toml-lang/toml",target:"_blank",rel:"noopener noreferrer"}},[t._v("TOML"),s("OutboundLink")],1),t._v(" 格式的 front matter。")]),t._v(" "),s("p",[t._v("JSON front matter 需要使用花括号开头和结尾：")]),t._v(" "),t._m(19),s("p",[t._v("TOML front matter 需要显式地标注为 TOML：")]),t._v(" "),t._m(20),t._m(21),t._v(" "),t._m(22),t._v(" "),t._m(23),t._m(24),t._v(" "),t._m(25),t._v(" "),t._m(26),t._v(" "),t._m(27),t._v(" "),t._m(28),t._m(29),t._v(" "),s("p",[t._v("🎉 💯")]),t._v(" "),s("p",[t._v("在"),s("a",{attrs:{href:"https://github.com/markdown-it/markdown-it-emoji/blob/master/lib/data/full.json",target:"_blank",rel:"noopener noreferrer"}},[t._v("这里"),s("OutboundLink")],1),t._v("可以找到所有可用的 emojis 列表。")]),t._v(" "),t._m(30),t._v(" "),t._m(31),t._v(" "),t._m(32),t._m(33),t._v(" "),s("p"),s("div",{staticClass:"table-of-contents"},[s("ul",[t._m(34),t._m(35),t._m(36),t._m(37),t._m(38),t._m(39),t._m(40),t._m(41),t._m(42),s("li",[s("a",{attrs:{href:"#导入代码片段-badge-text-beta-type-warn-badge-text-0-10-1-type-tip"}},[t._v("导入代码片段 "),s("Badge",{attrs:{text:"beta",type:"warn"}}),t._v(" "),s("Badge",{attrs:{text:"0.10.1+",type:"tip"}})],1)]),t._m(43)])]),s("p"),t._v(" "),s("p",[t._v("可以使用 "),s("router-link",{attrs:{to:"./../config/#markdown-toc"}},[s("code",[t._v("markdown.toc")])]),t._v(" 选项，来配置目录(table of contents - TOC)的渲染。")],1),t._v(" "),t._m(44),t._v(" "),t._m(45),t._v(" "),t._m(46),t._m(47),t._v(" "),t._m(48),t._v(" "),t._m(49),t._v(" "),t._m(50),t._v(" "),s("p",[t._v("你还可以自定义块的标题：")]),t._v(" "),t._m(51),t._m(52),t._v(" "),t._m(53),t._v(" "),t._m(54),t._v(" "),t._m(55),t._m(56),t._v(" "),t._m(57),t._m(58),t._v(" "),s("p",[t._v("你可以通过配置给每个代码块启用行号：")]),t._v(" "),t._m(59),t._v(" "),t._m(60),t._v(" "),t._m(61),t._v(" "),t._m(62),t._v(" "),s("h2",{attrs:{id:"导入代码片段"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#导入代码片段","aria-hidden":"true"}},[t._v("#")]),t._v(" 导入代码片段 "),s("Badge",{attrs:{text:"beta",type:"warn"}}),t._v(" "),s("Badge",{attrs:{text:"0.10.1+",type:"tip"}})],1),t._v(" "),s("p",[t._v("你能够通过下面的语法从已有文件里导入代码片段：")]),t._v(" "),t._m(63),t._m(64),t._v(" "),t._m(65),t._m(66),t._v(" "),t._m(67),t._m(68),t._v(" "),t._m(69),t._m(70),t._v(" "),t._m(71),t._v(" "),s("p",[t._v("VuePress 使用 "),s("a",{attrs:{href:"https://github.com/markdown-it/markdown-it",target:"_blank",rel:"noopener noreferrer"}},[t._v("markdown-it"),s("OutboundLink")],1),t._v("作为 markdwon 渲染器。上面的许多扩展都是通过定制插件实现的。你可以使用 "),s("code",[t._v(".vuepress/config.js")]),t._v(" 中的 "),s("code",[t._v("markdown")]),t._v(" 选项进一步自定义 "),s("code",[t._v("markdown-it")]),t._v(" 实例：")]),t._v(" "),t._m(72)])},[function(){var t=this.$createElement,e=this._self._c||t;return e("h1",{attrs:{id:"markdown-扩展"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#markdown-扩展","aria-hidden":"true"}},[this._v("#")]),this._v(" Markdown 扩展")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"标题锚点-header-anchors"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#标题锚点-header-anchors","aria-hidden":"true"}},[this._v("#")]),this._v(" 标题锚点(header anchors)")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"链接-links"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#链接-links","aria-hidden":"true"}},[this._v("#")]),this._v(" 链接(links)")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"内部链接-internal-links"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#内部链接-internal-links","aria-hidden":"true"}},[this._v("#")]),this._v(" 内部链接(internal links)")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("以 "),e("code",[this._v(".md")]),this._v(" 或 "),e("code",[this._v(".html")]),this._v(" 结尾的内部链接，会被转换为 "),e("code",[this._v("<router-link>")]),this._v("，用于单页面应用程序(SPA)导航。")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("静态网站的每个子目录都应该包含一个 "),e("code",[this._v("README.md")]),this._v("。这个文件会自动转换为 "),e("code",[this._v("index.html")]),this._v("。")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"tip custom-block"},[s("p",{staticClass:"custom-block-title"},[t._v("提示")]),t._v(" "),s("p",[t._v("在编写「链接到某个目录下 "),s("code",[t._v("index.html")]),t._v("」的相对路径时，不要忘记在结尾用 "),s("code",[t._v("/")]),t._v(" 闭合，否则你将得到一个 404。例如，使用 "),s("code",[t._v("/config/")]),t._v(" 而不是 "),s("code",[t._v("/config")]),t._v("。")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ol",[e("li",[this._v("在链接后面添加 "),e("code",[this._v(".html")]),this._v(" 或 "),e("code",[this._v(".md")])]),this._v(" "),e("li",[this._v("确保大小写对应正确，因为路径匹配是区分大小写的")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"示例"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#示例","aria-hidden":"true"}},[this._v("#")]),this._v(" 示例")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[this._v(".\n├─ README.md\n├─ foo\n│  ├─ README.md\n│  ├─ one.md\n│  └─ two.md\n└─ bar\n   ├─ README.md\n   ├─ three.md\n   └─ four.md\n")])])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-md extra-class"},[s("pre",{pre:!0,attrs:{class:"language-md"}},[s("code",[s("span",{pre:!0,attrs:{class:"token url"}},[t._v("[Home](/)")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("\x3c!-- 将根目录下的 README.md 发送给用户 --\x3e")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token url"}},[t._v("[foo](/foo/)")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("\x3c!-- 将 foo 目录下的 README.md 发送给用户 --\x3e")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token url"}},[t._v("[foo 标题锚点](/foo/#heading)")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("\x3c!-- 跳转到 foo 目录下的 README.md 文件中的特定锚点位置 --\x3e")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token url"}},[t._v("[foo - one](/foo/one.html)")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("\x3c!-- 追加 .html --\x3e")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token url"}},[t._v("[foo - two](/foo/two.md)")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("\x3c!-- 或者追加 .md --\x3e")]),t._v("\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"外部链接-external-links"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#外部链接-external-links","aria-hidden":"true"}},[this._v("#")]),this._v(" 外部链接(external links)")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("外部链接会被自动地设置为 "),e("code",[this._v('target="_blank" rel="noopener noreferrer"')]),this._v("：")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"front-matter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#front-matter","aria-hidden":"true"}},[this._v("#")]),this._v(" Front Matter")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-yaml extra-class"},[s("pre",{pre:!0,attrs:{class:"language-yaml"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("title")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Blogging Like a Hacker\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("lang")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" en"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("US\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("数据在页面的其余部分也可以使用，包括所有自定义和主题组件，通过 "),e("code",[this._v("$page")]),this._v(" 访问。")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("code",[this._v("title")]),this._v(" 和 "),e("code",[this._v("lang")]),this._v(" 会在当前页面自动设置。另外，你可以指定额外的 meta 标签进行注入：")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-yaml extra-class"},[s("pre",{pre:!0,attrs:{class:"language-yaml"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("meta")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n  "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" description\n    "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("content")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" hello\n  "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" keywords\n    "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("content")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" super duper SEO\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"其他可选择的-front-matter-格式"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#其他可选择的-front-matter-格式","aria-hidden":"true"}},[this._v("#")]),this._v(" 其他可选择的 Front Matter 格式")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[this._v('---\n{\n  "title": "Blogging Like a Hacker",\n  "lang": "en-US"\n}\n---\n')])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[this._v('---toml\ntitle = "Blogging Like a Hacker"\nlang = "en-US"\n---\n')])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"github-风格的表格"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#github-风格的表格","aria-hidden":"true"}},[this._v("#")]),this._v(" GitHub 风格的表格")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("strong",[this._v("输入")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[this._v("| Tables        | Are           | Cool  |\n| ------------- |:-------------:| -----:|\n| col 3 is      | right-aligned | $1600 |\n| col 2 is      | centered      |   $12 |\n| zebra stripes | are neat      |    $1 |\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("strong",[this._v("输出")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("table",[s("thead",[s("tr",[s("th",[t._v("Tables")]),t._v(" "),s("th",{staticStyle:{"text-align":"center"}},[t._v("Are")]),t._v(" "),s("th",{staticStyle:{"text-align":"right"}},[t._v("Cool")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[t._v("col 3 is")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("right-aligned")]),t._v(" "),s("td",{staticStyle:{"text-align":"right"}},[t._v("$1600")])]),t._v(" "),s("tr",[s("td",[t._v("col 2 is")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("centered")]),t._v(" "),s("td",{staticStyle:{"text-align":"right"}},[t._v("$12")])]),t._v(" "),s("tr",[s("td",[t._v("zebra stripes")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("are neat")]),t._v(" "),s("td",{staticStyle:{"text-align":"right"}},[t._v("$1")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"emoji"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#emoji","aria-hidden":"true"}},[this._v("#")]),this._v(" Emoji 🎉")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("strong",[this._v("输入")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[this._v(":tada: :100:\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("strong",[this._v("输出")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"目录-table-of-contents"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#目录-table-of-contents","aria-hidden":"true"}},[this._v("#")]),this._v(" 目录(table of contents)")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("strong",[this._v("输入")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[this._v("[[toc]]\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("strong",[this._v("输出")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"#标题锚点-header-anchors"}},[this._v("标题锚点(header anchors)")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"#链接-links"}},[this._v("链接(links)")]),e("ul",[e("li",[e("a",{attrs:{href:"#内部链接-internal-links"}},[this._v("内部链接(internal links)")])]),e("li",[e("a",{attrs:{href:"#外部链接-external-links"}},[this._v("外部链接(external links)")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"#front-matter"}},[this._v("Front Matter")]),e("ul",[e("li",[e("a",{attrs:{href:"#其他可选择的-front-matter-格式"}},[this._v("其他可选择的 Front Matter 格式")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"#github-风格的表格"}},[this._v("GitHub 风格的表格")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"#emoji-tada"}},[this._v("Emoji 🎉")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"#目录-table-of-contents"}},[this._v("目录(table of contents)")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"#自定义容器-custom-containers"}},[this._v("自定义容器(custom containers)")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"#在代码块中高亮显示行-line-highlighting-in-code-blocks"}},[this._v("在代码块中高亮显示行(line highlighting in code blocks)")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"#行号"}},[this._v("行号")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"#高级配置-advanced-configuration"}},[this._v("高级配置(advanced configuration)")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"自定义容器-custom-containers"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#自定义容器-custom-containers","aria-hidden":"true"}},[this._v("#")]),this._v(" 自定义容器(custom containers)")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("strong",[this._v("输入")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[this._v("::: tip\nThis is a tip\n:::\n\n::: warning\nThis is a warning\n:::\n\n::: danger\nThis is a dangerous warning\n:::\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("strong",[this._v("输出")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"tip custom-block"},[e("p",{staticClass:"custom-block-title"},[this._v("TIP")]),this._v(" "),e("p",[this._v("This is a tip")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"warning custom-block"},[e("p",{staticClass:"custom-block-title"},[this._v("WARNING")]),this._v(" "),e("p",[this._v("This is a warning")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"danger custom-block"},[e("p",{staticClass:"custom-block-title"},[this._v("WARNING")]),this._v(" "),e("p",[this._v("This is a dangerous thing")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[this._v("::: danger STOP\nDanger zone, do not proceed\n:::\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"danger custom-block"},[e("p",{staticClass:"custom-block-title"},[this._v("STOP")]),this._v(" "),e("p",[this._v("Danger zone, do not proceed")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"在代码块中高亮显示行-line-highlighting-in-code-blocks"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#在代码块中高亮显示行-line-highlighting-in-code-blocks","aria-hidden":"true"}},[this._v("#")]),this._v(" 在代码块中高亮显示行(line highlighting in code blocks)")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("strong",[this._v("输入")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[this._v("``` js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighted!'\n    }\n  }\n}\n```\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("strong",[this._v("输出")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-js extra-class"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("export")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n  "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n    "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n      msg"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Highlighted!'")]),t._v("\n    "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n  "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"行号"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#行号","aria-hidden":"true"}},[this._v("#")]),this._v(" 行号")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("module"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("exports "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n  markdown"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n    lineNumbers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n  "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("  \n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[this._v("示例:")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("picture",[e("source",{attrs:{srcset:"/line-numbers-desktop.png",media:"(min-width: 719px)"}}),this._v(" "),e("img",{staticClass:"line-numbers-desktop-snap",attrs:{alt:"Image"}})])},function(){var t=this.$createElement,e=this._self._c||t;return e("picture",[e("source",{attrs:{srcset:"/line-numbers-mobile.gif",media:"(max-width: 719px)"}}),this._v(" "),e("img",{staticClass:"line-numbers-mobile-snap",attrs:{alt:"Image"}})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"language-md extra-class"},[e("pre",{pre:!0,attrs:{class:"language-md"}},[e("code",[this._v("<<< @/filepath\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("它也支持"),e("a",{attrs:{href:"#line-highlighting-in-code-blocks"}},[this._v("行高亮")]),this._v(":")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"language-md extra-class"},[e("pre",{pre:!0,attrs:{class:"language-md"}},[e("code",[this._v("<<< @/filepath{highlightLines} \n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("strong",[this._v("输入")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"language-md extra-class"},[e("pre",{pre:!0,attrs:{class:"language-md"}},[e("code",[this._v("<<< @/test/markdown/fragments/snippet.js{2}\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("strong",[this._v("输出")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"language-D:\\AA\\Azg\\sx1\\1225\\项目\\-\\docs/test/markdown/fragments/snippet.js extra-class"},[e("div",{staticClass:"highlight-lines"},[e("br")]),e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[this._v("Not found: D")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"tip custom-block"},[e("p",{staticClass:"custom-block-title"},[this._v("TIP")]),this._v(" "),e("p",[this._v("由于导入的代码片段会在 webpack 编译之前执行，因此你无法在 webpack 中使用路径别名。"),e("code",[this._v("@")]),this._v(" 的默认值是 "),e("code",[this._v("process.cwd（）")]),this._v(" 。")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"高级配置-advanced-configuration"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#高级配置-advanced-configuration","aria-hidden":"true"}},[this._v("#")]),this._v(" 高级配置(advanced configuration)")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("module"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("exports "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n  markdown"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n    "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// markdown-it-anchor 的选项")]),t._v("\n    anchor"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" permalink"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n    "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// markdown-it-toc 的选项")]),t._v("\n    toc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" includeLevel"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n    config"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" md "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n      "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 使用更多 markdown-it 插件！")]),t._v("\n      md"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("use")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("require")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'markdown-it-xxx'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n    "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n  "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])}],!1,null,null,null);e.default=n.exports}}]);