File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
docusaurus/src/theme/EditThisPage Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ // Swizzle action eject is unsafe to perform on EditThisPage.
2+ // It is more likely to be affected by breaking changes in the future
3+ // https://docusaurus.io/docs/swizzling/
4+ //
5+ // We added nofollow to the link for SEO purposes.
6+ import React from 'react' ;
7+ import Translate from '@docusaurus/Translate' ;
8+ import { ThemeClassNames } from '@docusaurus/theme-common' ;
9+ import Link from '@docusaurus/Link' ;
10+ import IconEdit from '@theme/Icon/Edit' ;
11+ import type { Props } from '@theme/EditThisPage' ;
12+
13+ export default function EditThisPage ( { editUrl} : Props ) : JSX . Element {
14+ return (
15+ < Link to = { editUrl } className = { ThemeClassNames . common . editThisPage } rel = "nofollow noopener noreferrer" >
16+ < IconEdit />
17+ < Translate
18+ id = "theme.common.editThisPage"
19+ description = "The link label to edit the current page" >
20+ Edit this page
21+ </ Translate >
22+ </ Link >
23+ ) ;
24+ }
You can’t perform that action at this time.
0 commit comments