blog根目录,有个themes的目录(文件夹),cd进去,在此下载一个新的theme就可以了。
我们下载yilia,在themes目录:
1 | git clone https://github.com/litten/hexo-theme-yilia.git |
git克隆完之后,我们就有了新theme资源(themes下会有两个文件夹landscape和yilia)
之后在blog根目录下的_config.yml修改保存,hexo serve
会自动切换主题
1 | theme: yilia |
生命不休,学习不止
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true