1、node.js版本必须6.2以上
2、在hexo根目录下执行命令:
npm i hexo-generator-json-content --save3、在hexo的配置文件_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 添加后 hexo clean && hexo g && hexo d 就行了。
这些在如果所有文件给你不能正常使用会显示,我在这写是提示大家添加位置和添加内容的排版不能动,这是hexo的语法。这个所以文章功能个人感觉写的挺不错,自带搜索功能
版权声明:本文为qq_32337109原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。