mirror of
https://github.com/facebook/docusaurus.git
synced 2025-12-25 17:22:50 +00:00
fix(theme): Add translate no to heading anchors and blog authors (#11360)
Some checks failed
Argos CI / take-screenshots (push) Has been cancelled
Build Hash Router / Build Hash Router (push) Has been cancelled
Canary Release / Publish Canary (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Continuous Releases / Continuous Releases (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (18.0) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (20) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (22) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (24) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 Windows (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (node-modules, -s) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (node-modules, -st) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (pnp, -s) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (pnp, -st) (push) Has been cancelled
E2E Tests / E2E — npm (push) Has been cancelled
E2E Tests / E2E — pnpm (push) Has been cancelled
Some checks failed
Argos CI / take-screenshots (push) Has been cancelled
Build Hash Router / Build Hash Router (push) Has been cancelled
Canary Release / Publish Canary (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Continuous Releases / Continuous Releases (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (18.0) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (20) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (22) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (24) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 Windows (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (node-modules, -s) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (node-modules, -st) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (pnp, -s) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (pnp, -st) (push) Has been cancelled
E2E Tests / E2E — npm (push) Has been cancelled
E2E Tests / E2E — pnpm (push) Has been cancelled
This commit is contained in:
parent
b1391349f5
commit
27945b3b34
|
|
@ -30,10 +30,14 @@ function AuthorTitle({title}: {title: string}) {
|
|||
|
||||
function AuthorName({name, as}: {name: string; as: Props['as']}) {
|
||||
if (!as) {
|
||||
return <span className={styles.authorName}>{name}</span>;
|
||||
return (
|
||||
<span className={styles.authorName} translate="no">
|
||||
{name}
|
||||
</span>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<Heading as={as} className={styles.authorName}>
|
||||
<Heading as={as} className={styles.authorName} translate="no">
|
||||
{name}
|
||||
</Heading>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -54,7 +54,8 @@ export default function Heading({as: As, id, ...props}: Props): ReactNode {
|
|||
className="hash-link"
|
||||
to={`#${id}`}
|
||||
aria-label={anchorTitle}
|
||||
title={anchorTitle}>
|
||||
title={anchorTitle}
|
||||
translate="no">
|
||||
​
|
||||
</Link>
|
||||
</As>
|
||||
|
|
|
|||
Loading…
Reference in New Issue