This is an automated email from the ASF dual-hosted git repository.
guoqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-website.git
The following commit(s) were added to refs/heads/master by this push:
new 538d97f8ac4 fix: replace useBaseUrl to href (#1868)
538d97f8ac4 is described below
commit 538d97f8ac4ad3f361625b536b79e1b8c852ef13
Author: Qi Guo <[email protected]>
AuthorDate: Fri Mar 7 09:30:50 2025 +0800
fix: replace useBaseUrl to href (#1868)
---
website/src/components/ArrowAnim.tsx | 3 +--
website/src/components/sections/Endcta.tsx | 3 +--
website/src/components/sections/HeroSection.tsx | 3 +--
website/src/css/landing-sections/endcta.module.scss | 2 +-
4 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/website/src/components/ArrowAnim.tsx
b/website/src/components/ArrowAnim.tsx
index a1f696a439c..2daa1f53b64 100644
--- a/website/src/components/ArrowAnim.tsx
+++ b/website/src/components/ArrowAnim.tsx
@@ -1,13 +1,12 @@
import type { FC } from 'react';
import React from 'react';
import Link from '@docusaurus/Link';
-import useBaseUrl from '@docusaurus/useBaseUrl';
import Translate from '@docusaurus/Translate';
const ArrowAnim: FC = () => (
<Link
- to={useBaseUrl('blog')}
+ href="/blog"
className="btn-docs"
>
<div className="goto">
diff --git a/website/src/components/sections/Endcta.tsx
b/website/src/components/sections/Endcta.tsx
index bce8c336f40..894fe60e954 100644
--- a/website/src/components/sections/Endcta.tsx
+++ b/website/src/components/sections/Endcta.tsx
@@ -1,7 +1,6 @@
import type { FC } from 'react';
import React from 'react';
import Link from '@docusaurus/Link';
-import useBaseUrl from '@docusaurus/useBaseUrl';
import Translate from '@docusaurus/Translate';
import { LazyLoadImage } from 'react-lazy-load-image-component';
import useWindowType from '@theme/hooks/useWindowSize';
@@ -28,7 +27,7 @@ const EndCTA: FC = () => {
)}
</p>
<div className={style.links}>
- <Link to={useBaseUrl('docs/apisix/getting-started')} className="btn
btn-download">
+ <Link href="/docs/apisix/getting-started" className="btn btn-download">
<Translate id="hero.component.download.btn">Getting
Started</Translate>
</Link>
<ArrowAnim />
diff --git a/website/src/components/sections/HeroSection.tsx
b/website/src/components/sections/HeroSection.tsx
index 02d5815f008..f82192eed6b 100644
--- a/website/src/components/sections/HeroSection.tsx
+++ b/website/src/components/sections/HeroSection.tsx
@@ -1,7 +1,6 @@
import type { FC } from 'react';
import React from 'react';
import Link from '@docusaurus/Link';
-import useBaseUrl from '@docusaurus/useBaseUrl';
import Translate from '@docusaurus/Translate';
import BrowserOnly from '@docusaurus/BrowserOnly';
@@ -47,7 +46,7 @@ const HeroSection: FC = () => (
</Translate>
</h3>
<div className="hero-ctas">
- <Link to={useBaseUrl('docs/apisix/getting-started')} className="btn
btn-download">
+ <Link href="/docs/apisix/getting-started" className="btn btn-download">
<Translate id="hero.component.download.btn">Getting
Started</Translate>
</Link>
<ArrowAnim />
diff --git a/website/src/css/landing-sections/endcta.module.scss
b/website/src/css/landing-sections/endcta.module.scss
index e45fb8cf17a..e8a0f320456 100644
--- a/website/src/css/landing-sections/endcta.module.scss
+++ b/website/src/css/landing-sections/endcta.module.scss
@@ -54,7 +54,7 @@ $apisix-color: #e8433e;
@include respond-below(sm) {
min-height: 50vh;
- margin: 0 1rem;
+ margin: 4rem 1rem 0;
align-items: flex-start;
padding: 100px 2rem;