Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.

Latest commit

 

History

History
158 lines (96 loc) · 3.02 KB

setting.md

File metadata and controls

158 lines (96 loc) · 3.02 KB

基本设置

主题目录下_config.yml的简单设置。

下列设置中标注支持数组的,若没有明确说明,就是指允许接收数组数据在前端随机选择。

例如:

head:
    favicon: 
      - "/img/favicon.png"
      - "/img/favicon2.png"

上述设置可以随机站点图标。


uiux

标语

slogan string | string[] 支持数组

默认主色

defaultPrimaryColor string | string[ ] 支持数组

默认强调色

defaultAccentColor string | string[] 支持数组


head

站点图标

favicon string | string[] 支持数组


img 图像

用户头像 (avater)

avatar string | string[] 支持数组

首页左边的图片

left_pic string | string[] 支持数组

首页右边的图片(在移动端不会显示)

right_pic string | string[] 支持数组

默认文章图片

post_thumbnail string | string[] 支持数组

侧边栏图片

drawerHeaderBg string | string[] 支持数组


colorPicker boolean

是否显示侧边抽屉中的取色器。默认为false


comment 评论框

disqus

disqus: shortName: "xxx" 填入自己的shortname即可。

现已停止对多说的支持。


Drawer 侧边栏抽屉

object[]

本功能略微复杂,但功能亦很强大,最下面有示例。

侧边栏列表数组

title string

侧边栏项目标题

type string

侧边栏项目类型

  • sitelink: 相对站内路径
  • hr: 分隔线
  • page: 路由到page
  • link: 绝对url (站内路径请使用sitelink)

不填写点击就没有任何反应。

href string:当type为 sitelink 或 link 时生效

目标url

icon string

material图标名

nested object[]

子目录数组

initiallyOpen boolean

当指定nested时生效

true时默认展开

例如:

Drawer:
    -
      title: 首页
      type: sitelink
      href: /
      icon: home
    -
      title: hr
      type: hr
    -
      title: 关于我
      type: page
      name: 关于我
      icon: account_circle
    -
      title: Indox
      initiallyOpen: true
      icon: inbox
      nested:
        - 
          title: Starred
          type: link
          href: "https://www.baidu.com/"
          icon: search

下一篇 文章 Front-matter

回到首页