跳转到主要内容
你可以自定义当用户访问失效或缺失链接时显示的 404 错误页面的标题和说明。 在自定义 404 页面时,利用说明引导用户前往文档中的相关资源或链接,帮助他们找到所需内容。

配置

docs.json 文件的 errors.404 部分配置你的 404 页面:
"errors": {
  "404": {
    "redirect": false,
    "title": "页面未找到",
    "description": "这个_页面_**怎么了**?"
  }
}

参数

redirect
boolean
当页面未找到时,是否自动重定向到首页。设为 true 会重定向到首页。设为 false 将显示自定义 404 页面。
title
string
404 错误页面的自定义标题。此项将替换默认的“Page not found”标题。
description
string
404 错误页面的自定义说明。支持 Markdown 格式。
I