上次搭建博客用的lamp环境,这次用的lnmp环境,所以导致固定链接出现了问题,所以google了一下找到了方法。
用阿里云主机搭建的Nginx下的博客使用到Wordpress固定链接时,出现了404页面!下面我说一说如何解决这个问题!固定链接,我选择了自定义的“/%category%/%postname%/”修改固定链接后,访问文章会出现404错误!现在用的是Nginix,所以对应的要修改Nginix的Ngnix.conf配置文件,让其支持重定向!
本人纯属虚构
缺失模块。
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