Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 932 Bytes

404-500.en-US.mdx

File metadata and controls

57 lines (39 loc) · 932 Bytes

404 / 500 pages

Nextra support custom 404.mdx/500.mdx pages.

404

To add /404 page import NotFoundPage:

import { NotFoundPage } from 'nextra-theme-docs'

# 404 - This page could not be found

<NotFoundPage />

Click to try /404 page.

500

To add /500 page import ServerSideErrorPage:

import { ServerSideErrorPage } from 'nextra-theme-docs'

# 500 - Internal Server Error

<ServerSideErrorPage />

Click to try /500 page.

Customize Theme Config Options

Also, you can customize following options:

// ...
notFoundLink?: ReactNode | FC
notFoundLabels?: string
serverSideErrorLink?: ReactNode | FC
serverSideErrorLabels?: string

Customize Layout

"404": {
  "type": "page"
},
"500": {
  "type":"page",
  "theme": {
    "layout": "full"
  }
}