From 6e704c158369afe7ed844f1eea648825c3707c96 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Fri, 12 Sep 2025 01:12:26 +0000 Subject: [PATCH 1/8] Update settings/custom-404-page.mdx --- settings/custom-404-page.mdx | 73 ++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 settings/custom-404-page.mdx diff --git a/settings/custom-404-page.mdx b/settings/custom-404-page.mdx new file mode 100644 index 000000000..2d11a37c5 --- /dev/null +++ b/settings/custom-404-page.mdx @@ -0,0 +1,73 @@ +--- +title: "Custom 404 page" +description: "Create a custom 404 error page with personalized title and description" +--- + +You can customize your 404 "Page not found" error page to provide a better user experience when visitors encounter broken or missing links. + +## Configuration + +Configure your custom 404 page in the `errors.404` section of your `docs.json` file: + +```json +{ + "errors": { + "404": { + "redirect": false, + "title": "I can't be found", + "description": "What ever **happened** to this _page_?" + } + } +} +``` + +### Parameters + + + Whether to automatically redirect to the home page when a page is not found. Set to `false` to show the custom 404 page instead. + + + + Custom title for the 404 error page. This replaces the default "Page not found" heading. + + + + Custom description for the 404 error page. Supports Markdown formatting for styling text with **bold**, _italic_, and other formatting options. + + +## Example + +Here's a complete example showing how to set up a custom 404 page: + +```json +{ + "$schema": "https://mintlify.com/docs.json", + "name": "My Documentation", + "theme": "mint", + "colors": { + "primary": "#3B82F6" + }, + "navigation": { + "pages": ["index", "quickstart"] + }, + "errors": { + "404": { + "redirect": false, + "title": "Oops! Page not found", + "description": "The page you're looking for doesn't exist. Try checking the URL or **[return to our homepage](/)** to find what you need." + } + } +} +``` + +This configuration will: +- Show a custom 404 page instead of redirecting to the homepage +- Display "Oops! Page not found" as the title +- Show a helpful description with a link back to the homepage + +## Best practices + +- Keep your title concise and friendly +- Use the description to guide users to helpful resources +- Include links to your homepage or popular pages in the description +- Use Markdown formatting to make important information stand out \ No newline at end of file From 01ecacc4ccaf0819d4a7650603f13fc524ac8cf1 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Fri, 12 Sep 2025 01:12:41 +0000 Subject: [PATCH 2/8] Update docs.json --- docs.json | 1 + 1 file changed, 1 insertion(+) diff --git a/docs.json b/docs.json index 719f897ea..60741d566 100644 --- a/docs.json +++ b/docs.json @@ -46,6 +46,7 @@ "pages", "navigation", "themes", + "settings/custom-404-page", "settings/custom-domain" ] }, From c3dc19ba959cc5b8497832d229d9408ada104b12 Mon Sep 17 00:00:00 2001 From: Ethan Palm <56270045+ethanpalm@users.noreply.github.com> Date: Fri, 12 Sep 2025 11:09:19 -0700 Subject: [PATCH 3/8] add icon --- settings/custom-404-page.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/settings/custom-404-page.mdx b/settings/custom-404-page.mdx index 2d11a37c5..5e8ab13de 100644 --- a/settings/custom-404-page.mdx +++ b/settings/custom-404-page.mdx @@ -1,6 +1,7 @@ --- title: "Custom 404 page" description: "Create a custom 404 error page with personalized title and description" +icon: "file-warning" --- You can customize your 404 "Page not found" error page to provide a better user experience when visitors encounter broken or missing links. From 44c584774448b455451578c93159b1b82ffd5d5a Mon Sep 17 00:00:00 2001 From: Ethan Palm <56270045+ethanpalm@users.noreply.github.com> Date: Fri, 12 Sep 2025 11:10:09 -0700 Subject: [PATCH 4/8] move to guides --- docs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs.json b/docs.json index 60741d566..933526451 100644 --- a/docs.json +++ b/docs.json @@ -46,7 +46,6 @@ "pages", "navigation", "themes", - "settings/custom-404-page", "settings/custom-domain" ] }, @@ -145,6 +144,7 @@ "guides/changelogs", "guides/hidden-pages", "settings/broken-links", + "settings/custom-404-page", "guides/monorepo", { "group": "Custom Subdirectory", From 21311aa2961d0e0850c63189cea86decf3982fea Mon Sep 17 00:00:00 2001 From: Ethan Palm <56270045+ethanpalm@users.noreply.github.com> Date: Fri, 12 Sep 2025 11:22:37 -0700 Subject: [PATCH 5/8] copy edit --- settings/custom-404-page.mdx | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/settings/custom-404-page.mdx b/settings/custom-404-page.mdx index 5e8ab13de..1ee55286c 100644 --- a/settings/custom-404-page.mdx +++ b/settings/custom-404-page.mdx @@ -1,23 +1,21 @@ --- title: "Custom 404 page" -description: "Create a custom 404 error page with personalized title and description" +description: "Customize the title and description of your 404 error page" icon: "file-warning" --- -You can customize your 404 "Page not found" error page to provide a better user experience when visitors encounter broken or missing links. +You can control the title and content of the 404 error page that appears when users navigate to broken or missing links. ## Configuration -Configure your custom 404 page in the `errors.404` section of your `docs.json` file: +Configure your 404 page in the `errors.404` section of your `docs.json` file: ```json -{ - "errors": { - "404": { - "redirect": false, - "title": "I can't be found", - "description": "What ever **happened** to this _page_?" - } +"errors": { + "404": { + "redirect": false, + "title": "I can't be found", + "description": "What ever **happened** to this _page_?" } } ``` @@ -25,7 +23,11 @@ Configure your custom 404 page in the `errors.404` section of your `docs.json` f ### Parameters - Whether to automatically redirect to the home page when a page is not found. Set to `false` to show the custom 404 page instead. + Whether to automatically redirect to the home page when a page is not found. + + Set to `true` to redirect to the home page. + + Set to `false` to show the custom 404 page. @@ -33,7 +35,7 @@ Configure your custom 404 page in the `errors.404` section of your `docs.json` f - Custom description for the 404 error page. Supports Markdown formatting for styling text with **bold**, _italic_, and other formatting options. + Custom description for the 404 error page. Supports Markdown formatting. ## Example From 141447afca4d949d4044cfa7c6b8870097bbaccd Mon Sep 17 00:00:00 2001 From: Ethan Palm <56270045+ethanpalm@users.noreply.github.com> Date: Fri, 12 Sep 2025 11:22:50 -0700 Subject: [PATCH 6/8] remove duplicate example --- settings/custom-404-page.mdx | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/settings/custom-404-page.mdx b/settings/custom-404-page.mdx index 1ee55286c..9a6f82321 100644 --- a/settings/custom-404-page.mdx +++ b/settings/custom-404-page.mdx @@ -38,36 +38,6 @@ Configure your 404 page in the `errors.404` section of your `docs.json` file: Custom description for the 404 error page. Supports Markdown formatting. -## Example - -Here's a complete example showing how to set up a custom 404 page: - -```json -{ - "$schema": "https://mintlify.com/docs.json", - "name": "My Documentation", - "theme": "mint", - "colors": { - "primary": "#3B82F6" - }, - "navigation": { - "pages": ["index", "quickstart"] - }, - "errors": { - "404": { - "redirect": false, - "title": "Oops! Page not found", - "description": "The page you're looking for doesn't exist. Try checking the URL or **[return to our homepage](/)** to find what you need." - } - } -} -``` - -This configuration will: -- Show a custom 404 page instead of redirecting to the homepage -- Display "Oops! Page not found" as the title -- Show a helpful description with a link back to the homepage - ## Best practices - Keep your title concise and friendly From cb7acd7488e2a5757bcab3b7de3bce651c3f5394 Mon Sep 17 00:00:00 2001 From: Ethan Palm <56270045+ethanpalm@users.noreply.github.com> Date: Fri, 12 Sep 2025 11:26:17 -0700 Subject: [PATCH 7/8] consolidate best practices in the intro --- settings/custom-404-page.mdx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/settings/custom-404-page.mdx b/settings/custom-404-page.mdx index 9a6f82321..d0f36b7cd 100644 --- a/settings/custom-404-page.mdx +++ b/settings/custom-404-page.mdx @@ -4,7 +4,9 @@ description: "Customize the title and description of your 404 error page" icon: "file-warning" --- -You can control the title and content of the 404 error page that appears when users navigate to broken or missing links. +You can control the title and description of the 404 error page that appears when users navigate to broken or missing links. + +When customizing your 404 page, use the description to guide users to helpful resources or links in your documentation that can help them find what they're looking for. ## Configuration @@ -37,10 +39,3 @@ Configure your 404 page in the `errors.404` section of your `docs.json` file: Custom description for the 404 error page. Supports Markdown formatting. - -## Best practices - -- Keep your title concise and friendly -- Use the description to guide users to helpful resources -- Include links to your homepage or popular pages in the description -- Use Markdown formatting to make important information stand out \ No newline at end of file From 003ca5d8cb747889ef26f9d7e14cd0f6ccad8b64 Mon Sep 17 00:00:00 2001 From: Ethan Palm <56270045+ethanpalm@users.noreply.github.com> Date: Fri, 12 Sep 2025 11:27:52 -0700 Subject: [PATCH 8/8] change heading level --- settings/custom-404-page.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings/custom-404-page.mdx b/settings/custom-404-page.mdx index d0f36b7cd..916028a51 100644 --- a/settings/custom-404-page.mdx +++ b/settings/custom-404-page.mdx @@ -22,7 +22,7 @@ Configure your 404 page in the `errors.404` section of your `docs.json` file: } ``` -### Parameters +## Parameters Whether to automatically redirect to the home page when a page is not found.