From 6dd6e9b9a522e4e247b343ec648069116bad7d87 Mon Sep 17 00:00:00 2001 From: Zed Spencer-Milnes Date: Tue, 17 Dec 2024 02:14:23 +0000 Subject: [PATCH] Fix base url misbehaving, anchor links will now work --- docusaurus.config.ts | 8 ++++---- src/components/HomepageSoWhatIsOKD/index.tsx | 3 ++- static/manifest.json | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index e107565..3e7cb74 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -262,7 +262,7 @@ const config: Config = { tagName: 'link', attributes: { rel: 'icon', - href: 'favicon.ico', + href: deployPath + 'favicon.ico', sizes: "32x32" } }, @@ -270,7 +270,7 @@ const config: Config = { tagName: 'link', attributes: { rel: 'icon', - href: 'img/brand/logo/o-icon.svg', + href: deployPath + 'img/brand/logo/o-icon.svg', type: "image/svg+xml" } }, @@ -278,14 +278,14 @@ const config: Config = { tagName: 'link', attributes: { rel: 'apple-touch-icon', - href: 'img/brand/solid-icon-180x', + href: deployPath + 'img/brand/solid-icon-180x', } }, { tagName: 'link', attributes: { rel: 'manifest', - href: 'manifest.json', + href: deployPath + 'manifest.json', } }, ] diff --git a/src/components/HomepageSoWhatIsOKD/index.tsx b/src/components/HomepageSoWhatIsOKD/index.tsx index 446aacd..9774134 100644 --- a/src/components/HomepageSoWhatIsOKD/index.tsx +++ b/src/components/HomepageSoWhatIsOKD/index.tsx @@ -1,12 +1,13 @@ import clsx from 'clsx'; import styles from './styles.module.scss'; +import useBaseUrl from '@docusaurus/useBaseUrl'; export default function HomepageSoWhatIsOKD(): JSX.Element { return (
- +

So what does that mean exactly?

diff --git a/static/manifest.json b/static/manifest.json index fdcda2d..61bafe2 100644 --- a/static/manifest.json +++ b/static/manifest.json @@ -2,8 +2,8 @@ "short_name": "OKD", "name": "OKD Kubernetes Platform", "icons": [ - { "src": "img/brand/solid-icon-192x.png", "type": "image/png", "sizes": "192x192" }, - { "src": "img/brand/solid-icon-512x.png", "type": "image/png", "sizes": "512x512" } + { "src": "/img/brand/solid-icon-192x.png", "type": "image/png", "sizes": "192x192" }, + { "src": "/img/brand/solid-icon-512x.png", "type": "image/png", "sizes": "512x512" } ], "id": "./?source=pwa", "start_url": "./?source=pwa",