From 7c201f16ea34b6ab3ea2d5403b3d2908ddec2811 Mon Sep 17 00:00:00 2001 From: Kristaps Jurkans Date: Sun, 9 Nov 2025 13:07:43 +0000 Subject: [PATCH 1/5] feat(404-page): add ejected swizzle template --- src/theme/NotFound/Content/index.js | 36 +++++++++++++++++++++++++++++ src/theme/NotFound/index.js | 19 +++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 src/theme/NotFound/Content/index.js create mode 100644 src/theme/NotFound/index.js diff --git a/src/theme/NotFound/Content/index.js b/src/theme/NotFound/Content/index.js new file mode 100644 index 0000000..9fdac5a --- /dev/null +++ b/src/theme/NotFound/Content/index.js @@ -0,0 +1,36 @@ +import React from 'react'; +import clsx from 'clsx'; +import Translate from '@docusaurus/Translate'; +import Heading from '@theme/Heading'; +export default function NotFoundContent({className}) { + return ( +
+
+
+ + + Page Not Found + + +

+ + We could not find what you were looking for. + +

+

+ + Please contact the owner of the site that linked you to the + original URL and let them know their link is broken. + +

+
+
+
+ ); +} diff --git a/src/theme/NotFound/index.js b/src/theme/NotFound/index.js new file mode 100644 index 0000000..3b551f9 --- /dev/null +++ b/src/theme/NotFound/index.js @@ -0,0 +1,19 @@ +import React from 'react'; +import {translate} from '@docusaurus/Translate'; +import {PageMetadata} from '@docusaurus/theme-common'; +import Layout from '@theme/Layout'; +import NotFoundContent from '@theme/NotFound/Content'; +export default function Index() { + const title = translate({ + id: 'theme.NotFound.title', + message: 'Page Not Found', + }); + return ( + <> + + + + + + ); +} From 953b2b389df7a2fe23e5edf2c938dba2fa52b5b9 Mon Sep 17 00:00:00 2001 From: Kristaps Jurkans Date: Sun, 9 Nov 2025 14:12:37 +0000 Subject: [PATCH 2/5] feat(404-page): add wokwi cat --- static/img/wokwi-cat.svg | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 static/img/wokwi-cat.svg diff --git a/static/img/wokwi-cat.svg b/static/img/wokwi-cat.svg new file mode 100644 index 0000000..0acedf7 --- /dev/null +++ b/static/img/wokwi-cat.svg @@ -0,0 +1,39 @@ + + + + + + From 1de5bdba7db5b72c68e71e5a5f152f5222ad0915 Mon Sep 17 00:00:00 2001 From: Kristaps Jurkans Date: Sun, 9 Nov 2025 14:23:28 +0000 Subject: [PATCH 3/5] 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 --- i18n/en/code.json | 12 +++++++---- src/theme/NotFound/Content/index.js | 31 +++++++++++++++++++++++------ 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/i18n/en/code.json b/i18n/en/code.json index a193ee3..8c4b0b2 100644 --- a/i18n/en/code.json +++ b/i18n/en/code.json @@ -1,16 +1,20 @@ { "theme.NotFound.title": { - "message": "Page Not Found", + "message": "404 :(", "description": "The title of the 404 page" }, "theme.NotFound.p1": { - "message": "We could not find what you were looking for.", - "description": "The first paragraph of the 404 page" + "message": "Sorry, the page doesn't exist or has moved.", + "description": "The 1st paragraph of the 404 page" }, "theme.NotFound.p2": { - "message": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.", + "message": "Let's go back to the {homepage}.", "description": "The 2nd paragraph of the 404 page" }, + "theme.NotFound.homepageLink": { + "message": "homepage", + "description": "Label for the link to the homepage" + }, "theme.AnnouncementBar.closeButtonAriaLabel": { "message": "Close", "description": "The ARIA label for close button of announcement bar" diff --git a/src/theme/NotFound/Content/index.js b/src/theme/NotFound/Content/index.js index 9fdac5a..38bcc2e 100644 --- a/src/theme/NotFound/Content/index.js +++ b/src/theme/NotFound/Content/index.js @@ -2,6 +2,10 @@ import React from 'react'; import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; import Heading from '@theme/Heading'; +import Link from '@docusaurus/Link'; + +import WokwiCat from '/static/img/wokwi-cat.svg'; + export default function NotFoundContent({className}) { return (
@@ -11,24 +15,39 @@ export default function NotFoundContent({className}) { - Page Not Found + 404 :(

- We could not find what you were looking for. + description="The 1st paragraph of the 404 page"> + Sorry, the page doesn't exist or has moved.

- Please contact the owner of the site that linked you to the - original URL and let them know their link is broken. + description="The 2nd paragraph of the 404 page" + values={{ + homepage: ( + + + homepage + + + ) + }}> + Let's go back to the homepage.

+ +
+ +
+
From 5f8c1ac65f978cbc27eb0daf87a069824678d8b4 Mon Sep 17 00:00:00 2001 From: Kristaps Jurkans Date: Sun, 9 Nov 2025 15:04:03 +0000 Subject: [PATCH 4/5] feat(404-page): add paragraph explaining wokwi --- i18n/en/code.json | 4 ++++ src/theme/NotFound/Content/index.js | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/i18n/en/code.json b/i18n/en/code.json index 8c4b0b2..12fa324 100644 --- a/i18n/en/code.json +++ b/i18n/en/code.json @@ -15,6 +15,10 @@ "message": "homepage", "description": "Label for the link to the homepage" }, + "theme.NotFound.p3": { + "message": "Wokwi is an online electronics simulator, which can be used to simulate {Arduino}, {ESP32}, {STM32} & {Pico} projects, with support for many other popular boards and components. Get started for free at {wokwiWebsite}.", + "description": "A paragraph describing what Wokwi offers" + }, "theme.AnnouncementBar.closeButtonAriaLabel": { "message": "Close", "description": "The ARIA label for close button of announcement bar" diff --git a/src/theme/NotFound/Content/index.js b/src/theme/NotFound/Content/index.js index 38bcc2e..194ce0b 100644 --- a/src/theme/NotFound/Content/index.js +++ b/src/theme/NotFound/Content/index.js @@ -43,6 +43,19 @@ export default function NotFoundContent({className}) { Let's go back to the homepage.

+

+ Arduino, + ESP32: ESP32, + STM32: STM32, + Pico: Pico, + wokwiWebsite: wokwi.com + }}> + +

From 1a7c376e2c49883543a59f9eea5e0277fb7f7808 Mon Sep 17 00:00:00 2001 From: Kristaps Jurkans Date: Sun, 9 Nov 2025 15:10:27 +0000 Subject: [PATCH 5/5] feat(404-page): merge first two paragraphs together I think that this improves the look and the flow of the page, since it's slightly more condensed and the call to action (returning to the homepage) doesn't stick out more than the wokwi description part. --- src/theme/NotFound/Content/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/theme/NotFound/Content/index.js b/src/theme/NotFound/Content/index.js index 194ce0b..e61c206 100644 --- a/src/theme/NotFound/Content/index.js +++ b/src/theme/NotFound/Content/index.js @@ -24,8 +24,7 @@ export default function NotFoundContent({className}) { description="The 1st paragraph of the 404 page"> Sorry, the page doesn't exist or has moved. -

-

+