1 line
8.9 KiB
JavaScript
1 line
8.9 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{389:function(t,e,s){"use strict";s.r(e);var a=s(14),n=Object(a.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("p",[t._v("在"),e("code",[t._v("docs")]),t._v("目录下的"),e("code",[t._v("index.md")]),t._v("或"),e("code",[t._v("README.md")]),t._v("的 front matter 指定 "),e("code",[t._v("home: true")]),t._v(",就会为你的站点生成一个首页,示例:")]),t._v(" "),e("div",{staticClass:"language-yaml extra-class"},[e("pre",{pre:!0,attrs:{class:"language-yaml"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("home")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token boolean important"}},[t._v("true")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# heroImage: /img/web.png")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("heroText")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Evan's blog\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("tagline")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Web前端技术博客,积跬步以至千里,致敬每个爱学习的你。\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# actionText: 立刻进入 →")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# actionLink: /web/")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# bannerBg: auto # auto => 网格纹背景(有bodyBgImg时无背景),默认 | none => 无 | '大图地址' | background: 自定义背景样式 提示:如发现文本颜色不适应你的背景时可以到palette.styl修改$bannerTextColor变量")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("features")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 可选的")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("title")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 前端\n "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("details")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" JavaScript、ES6、Vue框架等前端技术\n "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("link")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /web/ "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 可选")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("imgUrl")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /img/web.png "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 可选")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("title")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 页面\n "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("details")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" html(5)/css(3),前端页面相关技术\n "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("link")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /ui/\n "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("imgUrl")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /img/ui.png\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("title")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 技术\n "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("details")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 技术文档、教程、技巧、总结等文章\n "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("link")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /technology/\n "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("imgUrl")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /img/other.png\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# 文章列表显示方式: detailed 默认,显示详细版文章列表(包括作者、分类、标签、摘要、分页等)| simple => 显示简约版文章列表(仅标题和日期)| none 不显示文章列表")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# postList: detailed")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# simplePostListLength: 10 # 简约版文章列表显示的文章数量,默认10。(仅在postList设置为simple时生效)")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# hideRightBar: true # 是否隐藏右侧边栏 (v1.11.2+)")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n")])])]),e("p",[t._v("一些字段还是沿用"),e("a",{attrs:{href:"https://vuepress.vuejs.org/zh/theme/default-theme-config.html#%E9%A6%96%E9%A1%B5",target:"_blank",rel:"noopener noreferrer"}},[t._v("默认主题"),e("OutboundLink")],1),t._v("的,这里只对修改的地方做一个补充。")]),t._v(" "),e("h3",{attrs:{id:"bannerbg"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#bannerbg"}},[t._v("#")]),t._v(" bannerBg")]),t._v(" "),e("ul",[e("li",[t._v("类型:"),e("code",[t._v("string")])]),t._v(" "),e("li",[t._v("可选参数:\n"),e("ul",[e("li",[e("code",[t._v("auto")]),t._v(" 自动背景,一般会显示网格纹背景,如果在"),e("code",[t._v("config.js")]),t._v("设置了"),e("code",[t._v("bodyBgImg")]),t._v("时则无背景")]),t._v(" "),e("li",[e("code",[t._v("none")]),t._v(" 无背景")]),t._v(" "),e("li",[e("code",[t._v("<大图地址>")]),t._v(",如"),e("code",[t._v("/img/bg.jpeg")])]),t._v(" "),e("li",[e("code",[t._v("background: <自定义背景样式>")]),t._v(",如"),e("code",[t._v("background: blue")])])])]),t._v(" "),e("li",[t._v("默认: "),e("code",[t._v("auto")])])]),t._v(" "),e("h3",{attrs:{id:"features"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#features"}},[t._v("#")]),t._v(" features")]),t._v(" "),e("ul",[e("li",[t._v("类型:"),e("code",[t._v("{title: string, details: string, link?: string, imgUrl?: string}[]")])])]),t._v(" "),e("p",[t._v("features是在banner栏显示的特性描述,主题添加了图片的展示和点击跳转的链接")]),t._v(" "),e("ul",[e("li",[e("strong",[t._v("features[index].link")]),t._v(" 当前feature跳转的链接,可选")]),t._v(" "),e("li",[e("strong",[t._v("features[index].imgUrl")]),t._v(" 当前feature的图片地址,可选")])]),t._v(" "),e("h3",{attrs:{id:"postlist"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#postlist"}},[t._v("#")]),t._v(" postList")]),t._v(" "),e("ul",[e("li",[t._v("类型:"),e("code",[t._v("'detailed' | 'simple' | 'none'")])]),t._v(" "),e("li",[t._v("可选参数:\n"),e("ul",[e("li",[e("code",[t._v("detailed")]),t._v(" 显示详细版文章列表(包括标题、日期、作者、分类、标签、摘要、分页等)")]),t._v(" "),e("li",[e("code",[t._v("simple")]),t._v(" 显示简约版文章列表(仅标题和日期)")]),t._v(" "),e("li",[e("code",[t._v("none")]),t._v(" 不显示文章列表")])])]),t._v(" "),e("li",[t._v("默认: "),e("code",[t._v("detailed")])])]),t._v(" "),e("p",[t._v("首页内容中的文章列表显示方式")]),t._v(" "),e("h3",{attrs:{id:"simplepostlistlength"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#simplepostlistlength"}},[t._v("#")]),t._v(" simplePostListLength "),e("Badge",{attrs:{text:"v1.5.1 +"}})],1),t._v(" "),e("ul",[e("li",[t._v("类型:"),e("code",[t._v("number")])]),t._v(" "),e("li",[t._v("默认: "),e("code",[t._v("10")])])]),t._v(" "),e("p",[t._v("简约版文章列表显示的文章数量,默认"),e("code",[t._v("10")]),t._v("。(仅在"),e("code",[t._v("postList")]),t._v("设置为"),e("code",[t._v("simple")]),t._v("时生效)")]),t._v(" "),e("h3",{attrs:{id:"hiderightbar"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#hiderightbar"}},[t._v("#")]),t._v(" hideRightBar "),e("Badge",{attrs:{text:"v1.11.2 +"}})],1),t._v(" "),e("ul",[e("li",[t._v("类型:"),e("code",[t._v("boolean")])]),t._v(" "),e("li",[t._v("默认: "),e("code",[t._v("false")])])]),t._v(" "),e("p",[t._v("是否隐藏右侧边栏")]),t._v(" "),e("div",{staticClass:"custom-block warning"},[e("p",{staticClass:"custom-block-title"},[t._v("注意")]),t._v(" "),e("p",[t._v("原默认主题首页的footer字段已改到"),e("code",[t._v("config.js")]),t._v("文件里设置")])])])}),[],!1,null,null,null);e.default=n.exports}}]); |