mirror of
https://github.com/Wcowin/Mkdocs-Wcowin.git
synced 2025-07-21 09:26:34 +00:00
18 KiB
18 KiB
title, hide, tags, comments
title | hide | tags | comments | |
---|---|---|---|---|
添加404页面 |
|
false |
首先在mkdocs.yml文件中添加custom_dir:
theme:
name: material
custom_dir: docs/overrides #覆写路径
docs/overrides文件下新建404.html
树状结构如下:
$ tree -a
.
├── .github
│ ├── .DS_Store
│ └── workflows
│ └── PublishMySite.yml
├── docs
│ └── index.md
│ └──overrides
│ └──assets
│ └──404.html
│ └──main.html
│ └──partials
│ └──comments.html
│
└── mkdocs.yml
404公益页面
??? note "点击展开"
html <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>404 - 页面不存在</title>
<html lang="zh-cn">
<head>
</head>

404 NOT Found
您访问的页面走丢在寻找梦想的路上了
不过您还可以和腾讯志愿者一起
为孩子们点亮一个梦想404骰子页面
目前更换了新的404页面:
??? note "点击展开" ```html <html> <head>