1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-24 21:15:51 +01:00

fix: useBaseUrl on translated links (#2353)

This commit is contained in:
Sergio Moreno 2021-07-28 00:04:36 +02:00 committed by GitHub
parent 25a4601594
commit d1d820f8b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 4 deletions

@ -49,7 +49,7 @@ const Features = (): React.ReactElement => (
))}
</div>
<div className={styles.linkFeatures}>
<Link to="/docs/configuration" className="link-primary">
<Link to={useBaseUrl("/docs/configuration")} className="link-primary">
<Translate>Discover more features</Translate>
</Link>
</div>

@ -23,7 +23,7 @@ const Header = (): React.ReactElement => {
<a href="https://github.com/verdaccio/verdaccio" className="link-secondary">
GITHUB
</a>
<Link to="/docs/what-is-verdaccio" className="link-primary">
<Link to={useBaseUrl("/docs/what-is-verdaccio")} className="link-primary">
<Translate>GET STARTED</Translate>
</Link>
<a href="https://github.com/verdaccio/verdaccio/blob/master/CONTRIBUTING.md" className="link-secondary">

@ -1,6 +1,7 @@
import React from 'react';
import Translate from '@docusaurus/Translate';
import { Link } from '@docusaurus/router';
import useBaseUrl from '@docusaurus/useBaseUrl';
import Divider from './Divider';
import styles from './WhatIsVerdaccio.module.scss';
@ -19,7 +20,7 @@ const WhatIs = (): React.ReactElement => (
services such as Amazon&apos;s S3, Google Cloud Storage or create your own plugin.
</Translate>
</p>
<Link to="/docs/installation" className="link-primary">
<Link to={useBaseUrl("/docs/installation")} className="link-primary">
<Translate>Dive into Verdaccio</Translate>
</Link>
<Divider />

@ -5,6 +5,7 @@ import { Follow } from 'react-twitter-widgets';
import Translate from '@docusaurus/Translate';
import clsx from 'clsx';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import useBaseUrl from '@docusaurus/useBaseUrl';
import styles from './help.module.scss';
@ -56,7 +57,7 @@ const SUPPORT_LINKS = (lang: string) => [
<Translate
values={{
link: (
<Link to="/docs/what-is-verdaccio">
<Link to={useBaseUrl("/docs/what-is-verdaccio")}>
<Translate>documentation on this site</Translate>
</Link>
),