yuang01 / hexo-theme-bamboo

Hexo博客主题,功能强大,美观
https://hexo-theme-bamboo.netlify.app/
MIT License
421 stars 61 forks source link

404页面如何配置 #17

Closed xingchenxuup closed 3 years ago

xingchenxuup commented 3 years ago

如题

yuang01 commented 3 years ago

在hexo的souce文件夹下创建一个404.md,之后输入如下内容:


---
title: 404
date: 2019-11-23 21:10:10
type: "404"
layout: "404"
---

然后发布上去,看看有没有效果

xingchenxuup commented 3 years ago

image 似乎不行

yuang01 commented 3 years ago

确实有问题,我有时间改一改

yuang01 commented 3 years ago

要不这样改也行

source文件夹下创建404.md页面,然后输入以下内容:

---
title: '页面未找到'
date: 2019-11-23 21:10:10
onlyTitle: true
toc: false
donate: false
share: false
copyright: false
img: https://pic3.zhimg.com/80/378da4d6e6ac67c5bcd1d63d76f65d81_1440w.jpg?source=1940ef5c
---
{% p center large, 404 %}
{% p center large, 很抱歉,您访问的页面不存在 %}
{% p center small, 可能是输入地址有误或该地址已被删除 %}

{% btn center large, 返回首页, /, fa fa-home %}

感觉这种404也还可以

https://yuang01.github.io/121