hexo自定义404页面

1.找到你中意的404页面

推荐一款:https://404.life

预览保存,如果你看到其他喜欢的页面如何F12扒页面我就不教咯~

2.hexo配置

2.1 把css和js放在博客下

我是放在这儿的,你也可以放在github,用jsd加速。
hexo自定义404页面_第1张图片

2.2 新建404.html

  1. 路径是在:博客\source\404.html,它和_post同级。
  2. 修改页面内容。(注意css的引用路径)

hexo自定义404页面_第2张图片
3.设置404跳过渲染:_config.yml

skip_render: ##跳过指定渲染,忽略文章skip_render: "_posts/hello-world.md"
  - 404.html

页面效果:
hexo自定义404页面_第3张图片

tips:butterfly主题可以关掉默认的404页面
hexo自定义404页面_第4张图片

做个记录,以后查看。

你可能感兴趣的:(#,butterfly,#,Html,html,css,404)