Skip to content

Commit 7cb58aa

Browse files
committed
refactor: add nofollow property for a link
1 parent 136f012 commit 7cb58aa

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

client/pages/admin/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const Home: NextPage<IHomeProps> = ({ articles = [], comments: defaultComments =
8181
<Typography>
8282
<Title>
8383
您好,{user.name},欢迎使用
84-
<a href="https://github.com/fecommnity/reactpress" target="_blank">
84+
<a href="https://github.com/fecommnity/reactpress" target="_blank" rel='nofollow'>
8585
ReactPress
8686
</a>
8787

client/src/components/AboutUs/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const GitHub = () => {
5252
className={style.github}
5353
href="https://github.com/fecommunity/reactpress"
5454
target="_blank"
55-
rel="noopener noreferrer"
55+
rel="noopener noreferrer nofollow"
5656
>
5757
<GithubOutlined />
5858
</a>

client/src/components/Header/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { useToggle } from '@/hooks/useToggle';
1414
import { getDocumentScrollTop } from '@/utils';
1515

1616
import style from './index.module.scss';
17+
import { GitHub } from '../AboutUs';
1718

1819
const NAV_LINKS = [
1920
{
@@ -161,6 +162,9 @@ export const Header = ({ setting, tags, pages, hasBg = false }) => {
161162
<li className={style.toolWrapper}>
162163
<Locales />
163164
</li>
165+
<li className={style.toolWrapper}>
166+
<GitHub />
167+
</li>
164168
</ul>
165169
<Search tags={tags} visible={showSearch} onClose={toggleSearch} />
166170
</nav>

0 commit comments

Comments
 (0)