- 开发无止境 -
Data: 2015-12-18 19:02:14Form: JournalClick: 14
VuePress
遵循 “约定优于配置” 的原则.
├── docs
│ ├── .vuepress (可选的)
│ │ ├── components (可选的)
│ │ ├── theme (可选的)
│ │ │ └── Layout.vue
│ │ ├── public (可选的)
│ │ ├── styles (可选的)
│ │ │ ├── index.styl
│ │ │ └── palette.styl
│ │ ├── templates (可选的, 谨慎配置)
│ │ │ ├── dev.html
│ │ │ └── ssr.html
│ │ ├── config.js (可选的)
│ │ └── enhanceApp.js (可选的)
│ │
│ ├── README.md
│ ├── guide (可选的)
│ │ └── README.md (可选的)
│ └── config.md (可选的)
│
└── package.json
.vuepress
目录config.js
文件.
├─ docs
│ ├─ README.md
│ └─ .vuepress
│ └─ config.js
└─ package.json
config.js
文件module.exports = {
title: "欧阳克个人博客",
description: "学习并分享PHP、Linux、MySQL和前端技术等WEB知识。",
head: [["link", { rel: "icon", href: "/logo.jpg" }]],
};
public
目录,保存图片配置项 | 数据类型 | 默认值 | 作用 |
---|---|---|---|
base | string | / | 部署站点的基础路径,如果你想让你的网站部署到一个子路径下,你将需要设置它。 |
title | string | undefined | 网站的标题,它将会被用作所有页面标题的前缀,同时,默认主题下,它将显示在导航栏(navbar)上。 |
description | string | undefined | 网站的描述,它将会以 <meta> 标签渲染到当前页面的 HTML 中。 |
head | Array | [] | 额外的需要被注入到当前页面的 HTML <head> 中的标签。 |
host | string | '0.0.0.0' | 指定用于 dev server 的主机名。 |
port | number | 8080 | 指定 dev server 的端口。 |
temp | string | /path/to/@vuepress/core/.temp | 指定客户端文件的临时目录。 |
dest | string | .vuepress/dist | 指定 vuepress build 的输出目录。 |
locales | {[path: string]: Object} | undefined | 提供多语言支持的语言配置。 |
shouldPrefetch | Function | () => true | 一个函数,用来控制对于哪些文件,是需要生成 <link rel="prefetch"> 资源提示的。 |
cache | boolean | true | VuePress 默认使用了 cache-loader (opens new window)来大大地加快 webpack 的编译速度。 |
extraWatchFiles | Array | [] | 指定额外的需要被监听的文件 |
README.md
或者 index.md
文件,对应的链接将被视为 /
html
目录 和 README.md
文件# 这是 html 目录 下的文件