hexo的next404页面教程

配置

_config.next.yml

1
2
menu:
commonweal: /404/ || fa fa-heartbeat

终端根目录输入

1
hexo new page 404

修改 source/404/index.md

1
2
3
4
5
6
7
---
title: 404 Not Found:该页无法显示
permalink: /404.html
toc: false
comments: false
---
<script type="text/javascript" src="//qzonestyle.gtimg.cn/qzone/hybrid/app/404/search_children.js" homepagename='返回主页' homepageurl="/" charset="utf-8"></script>

或者

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
---
title: 404 Not Found:该页无法显示
permalink: /404.html
toc: false
comments: false
---
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>404 Not Found:该页无法显示</title>
</head>
<body>
<script type="text/javascript" src="//qzonestyle.gtimg.cn/qzone/hybrid/app/404/search_children.js" homePageName="返回首页" homePageUrl="/"></script>
</body>
</html>

image-20200923130240521

Cannot GET /*

本地环境会出现

image-20200923131010687

请部署到GitHub Pages就正常了

参考

GitHub 官方解决