hexo 目录结构
参考:https://hexo.io/zh-cn/docs/setup
hexo 目录结构
1 2 3 4 5 6 7 8
| . ├── _config.yml ├── package.json ├── scaffolds ├── source | ├── _drafts | └── _posts └── themes
|
_config.yml
详见
网站的 配置 信息,您可以在此配置大部分的参数。
package.json
应用程序的信息。EJS, Stylus 和 Markdown renderer 已默认安装,您可以自由移除。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| { "name": "hexo-site", "version": "0.0.0", "private": true, "scripts": { "build": "hexo generate", "clean": "hexo clean", "deploy": "hexo deploy", "server": "hexo server" }, "hexo": { "version": "4.2.0" }, "dependencies": { "hexo": "^4.0.0", "hexo-deployer-git": "^2.1.0", "hexo-filter-flowchart": "^1.0.4", "hexo-filter-mermaid-diagrams": "^1.0.5", "hexo-filter-sequence": "^1.0.3", "hexo-generator-archive": "^1.0.0", "hexo-generator-category": "^1.0.0", "hexo-generator-index": "^1.0.0", "hexo-generator-search": "^2.4.0", "hexo-generator-tag": "^1.0.0", "hexo-renderer-ejs": "^1.0.0", "hexo-renderer-marked": "^2.0.0", "hexo-renderer-stylus": "^1.1.0", "hexo-server": "^1.0.0" } }
|
scaffolds
详见
模版 文件夹。当您新建文章时,Hexo 会根据 scaffold 来建立文件。
Hexo 的模板是指在新建的文章文件中默认填充的内容。例如,如果您修改 scaffold/post.md 中的 Front-matter 内容,那么每次新建一篇文章时都会包含这个修改。
source
资源文件夹是存放用户资源的地方。除 _posts 文件夹之外,开头命名为 _ (下划线)的文件 / 文件夹和隐藏的文件将会被忽略。Markdown 和 HTML 文件会被解析并放到 public 文件夹,而其他文件会被拷贝过去。
themes
详见
主题 文件夹。Hexo 会根据主题来生成静态页面。