1.找到你中意的404页面
推荐一款:https://404.life
预览保存,如果你看到其他喜欢的页面如何F12扒页面我就不教咯~
2.hexo配置
2.1 把css和js放在博客下
我是放在这儿的,你也可以放在github,用jsd加速。
2.2 新建404.html
- 路径是在:
博客\source\404.html
,它和_post同级。 - 修改页面内容。(注意css的引用路径)
3.设置404跳过渲染:_config.yml
skip_render: ##跳过指定渲染,忽略文章skip_render: "_posts/hello-world.md"
- 404.html
页面效果:
tips:butterfly主题可以关掉默认的404页面
做个记录,以后查看。