安装配置
precondition: nodejs ——生成静态页面
1.npm安装
建站
1.初始化
2.文件目录
3.配置文件config.yml
具体配置文件参数见手册
| Setting | Description |
| ----------- | ----------- |
| title | |
| subtitle | |
| description | |
| author | |
部署
1.安装hexo-deployer-git,提交远程仓库
2.修改配置文件deploy部分
3.生成静态文件
4.启动服务器
5.push到github命令
写作
1.新建文章
2.<!—more—>
显示到此处截止
3.草稿source/_draft
4.publish
发表草稿
5.Front-matter
-预设参数-
Setting | Description |
---|---|
layout | |
title | |
date | |
updated | 更新日期 |
comments | 开启文章评论功能,默认true |
tags | |
categories | 分类有顺序性和层次性 |
permalink | 覆盖文章网址 |
6.render
渲染文章
7.list
显示网站内容
8.关于README.md
一般的,readme并不需要每次渲染,并且不被归入archieve
中。因此需要在每次渲染生成的时候跳过该文件。
主题
1.安装主题yilia
2.修改根目录配置文件_config.yml
3.更新主题
4.当根目录添加了git远程仓库,主题目录可用subtree管理
Plug-in
1.某篇文档加密
下载encrypt组件
1npm install hexo-encrypt --save添加配置项
_config_yml
12encrypt:password: xxxxxx文章需加密front-matter添加
1234---encrypt: trueenc_pwd: xxxx---
2.搜索组件
下载组件
1npm install hexo-generator-json-content --save添加配置项
_config.yml
123456789101112131415161718jsonContent:meta: falsepages: falseposts:title: truedate: truepath: truetext: falseraw: falsecontent: falseslug: falseupdated: falsecomments: falselink: falsepermalink: falseexcerpt: falsecategories: falsetags: true