Skip to content

Commit 2cfa941

Browse files
authored
fix: homepage link 404 (#1870)
1 parent 538d97f commit 2cfa941

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

website/src/components/ArrowAnim.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import type { FC } from 'react';
22
import React from 'react';
33
import Link from '@docusaurus/Link';
4+
import useBaseUrl from '@docusaurus/useBaseUrl';
45

56
import Translate from '@docusaurus/Translate';
67

78
const ArrowAnim: FC = () => (
89
<Link
9-
href="/blog"
10+
target="_parent"
11+
to={useBaseUrl('/blog/')}
1012
className="btn-docs"
1113
>
1214
<div className="goto">

website/src/components/sections/Endcta.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Link from '@docusaurus/Link';
44
import Translate from '@docusaurus/Translate';
55
import { LazyLoadImage } from 'react-lazy-load-image-component';
66
import useWindowType from '@theme/hooks/useWindowSize';
7+
import useBaseUrl from '@docusaurus/useBaseUrl';
78
import ArrowAnim from '../ArrowAnim';
89
import style from '../../css/landing-sections/endcta.module.scss';
910

@@ -27,7 +28,7 @@ const EndCTA: FC = () => {
2728
)}
2829
</p>
2930
<div className={style.links}>
30-
<Link href="/docs/apisix/getting-started" className="btn btn-download">
31+
<Link target="_parent" to={useBaseUrl('docs/apisix/getting-started')} className="btn btn-download">
3132
<Translate id="hero.component.download.btn">Getting Started</Translate>
3233
</Link>
3334
<ArrowAnim />

website/src/components/sections/HeroSection.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Translate from '@docusaurus/Translate';
55

66
import BrowserOnly from '@docusaurus/BrowserOnly';
77
import useWindowType from '@theme/hooks/useWindowSize';
8+
import useBaseUrl from '@docusaurus/useBaseUrl';
89
import ArrowAnim from '../ArrowAnim';
910
import '../../css/landing-sections/hero.scss';
1011

@@ -46,7 +47,7 @@ const HeroSection: FC = () => (
4647
</Translate>
4748
</h3>
4849
<div className="hero-ctas">
49-
<Link href="/docs/apisix/getting-started" className="btn btn-download">
50+
<Link target="_parent" to={useBaseUrl('docs/apisix/getting-started')} className="btn btn-download">
5051
<Translate id="hero.component.download.btn">Getting Started</Translate>
5152
</Link>
5253
<ArrowAnim />

0 commit comments

Comments
 (0)