Skip to content

Commit b160234

Browse files
committed
feat: 增加externalLinkIcon配置,不显示外部链接图标
1 parent cd4f9cc commit b160234

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

docs/.vuepress/theme/theme.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { hopeTheme } from 'vuepress-theme-hope'
2-
import { AUTHOR_INFO, COPYRIGHT, FOOTER_HTML_INFO } from './constant'
3-
import { i18n, searchProCNLocals } from './i18n'
1+
import {hopeTheme} from 'vuepress-theme-hope'
2+
import {AUTHOR_INFO, COPYRIGHT, FOOTER_HTML_INFO} from './constant'
3+
import {i18n, searchProCNLocals} from './i18n'
44
import navbar from './navbar'
55
import sidebar from './sidebar'
66

@@ -32,7 +32,6 @@ export const themeConfig = {
3232
end: ['Links', 'Language', 'Outlook', 'Search', 'Repo'],
3333
},
3434
sidebar,
35-
3635
pageInfo: ['Author', 'Original', 'Date', 'Category', 'Tag', 'ReadingTime'],
3736
// 主题布局选项
3837
docsRepo: 'https://github.com/142vip/JavaScriptCollection',
@@ -60,6 +59,9 @@ export const themeConfig = {
6059
// 主题色选择器
6160
themeColor: true,
6261

62+
// 是否显示外部链接图标
63+
externalLinkIcon: false,
64+
6365
plugins: {
6466
// comment:{
6567
// provider: "Artalk",
@@ -92,11 +94,11 @@ export const themeConfig = {
9294
stylize: [
9395
{
9496
matcher: 'Recommended',
95-
replacer: ({ tag }) => {
97+
replacer: ({tag}) => {
9698
if (tag === 'em') {
9799
return {
98100
tag: 'Badge',
99-
attrs: { type: 'tip' },
101+
attrs: {type: 'tip'},
100102
content: 'Recommended',
101103
}
102104
}

0 commit comments

Comments
 (0)