Skip to content

Commit 1de5bdb

Browse files
committed
feat(404-page): update 404 page
This commit: - adds link to return to docs homepage - adds Wokwi cat (from wokwi.com 404 page) - updates english localisation
1 parent 953b2b3 commit 1de5bdb

File tree

2 files changed

+33
-10
lines changed

2 files changed

+33
-10
lines changed

i18n/en/code.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
{
22
"theme.NotFound.title": {
3-
"message": "Page Not Found",
3+
"message": "404 :(",
44
"description": "The title of the 404 page"
55
},
66
"theme.NotFound.p1": {
7-
"message": "We could not find what you were looking for.",
8-
"description": "The first paragraph of the 404 page"
7+
"message": "Sorry, the page doesn't exist or has moved.",
8+
"description": "The 1st paragraph of the 404 page"
99
},
1010
"theme.NotFound.p2": {
11-
"message": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.",
11+
"message": "Let's go back to the {homepage}.",
1212
"description": "The 2nd paragraph of the 404 page"
1313
},
14+
"theme.NotFound.homepageLink": {
15+
"message": "homepage",
16+
"description": "Label for the link to the homepage"
17+
},
1418
"theme.AnnouncementBar.closeButtonAriaLabel": {
1519
"message": "Close",
1620
"description": "The ARIA label for close button of announcement bar"

src/theme/NotFound/Content/index.js

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import React from 'react';
22
import clsx from 'clsx';
33
import Translate from '@docusaurus/Translate';
44
import Heading from '@theme/Heading';
5+
import Link from '@docusaurus/Link';
6+
7+
import WokwiCat from '/static/img/wokwi-cat.svg';
8+
59
export default function NotFoundContent({className}) {
610
return (
711
<main className={clsx('container margin-vert--xl', className)}>
@@ -11,24 +15,39 @@ export default function NotFoundContent({className}) {
1115
<Translate
1216
id="theme.NotFound.title"
1317
description="The title of the 404 page">
14-
Page Not Found
18+
404 :(
1519
</Translate>
1620
</Heading>
1721
<p>
1822
<Translate
1923
id="theme.NotFound.p1"
20-
description="The first paragraph of the 404 page">
21-
We could not find what you were looking for.
24+
description="The 1st paragraph of the 404 page">
25+
Sorry, the page doesn't exist or has moved.
2226
</Translate>
2327
</p>
2428
<p>
2529
<Translate
2630
id="theme.NotFound.p2"
27-
description="The 2nd paragraph of the 404 page">
28-
Please contact the owner of the site that linked you to the
29-
original URL and let them know their link is broken.
31+
description="The 2nd paragraph of the 404 page"
32+
values={{
33+
homepage: (
34+
<Link to="/">
35+
<Translate
36+
id="theme.NotFound.homepageLink"
37+
description="Label for the link to the homepage">
38+
homepage
39+
</Translate>
40+
</Link>
41+
)
42+
}}>
43+
Let's go back to the homepage.
3044
</Translate>
3145
</p>
46+
47+
<div style={{display: 'flex', justifyContent: 'center'}}>
48+
<WokwiCat style={{fill: 'currentColor'}}/>
49+
</div>
50+
3251
</div>
3352
</div>
3453
</main>

0 commit comments

Comments
 (0)