Skip to content

Commit

Permalink
fix: 修复链接错误
Browse files Browse the repository at this point in the history
  • Loading branch information
jiazengp committed Feb 22, 2024
1 parent 1cbe5d1 commit 6284097
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .vitepress/theme/components/Card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ const Card: FunctionalComponent<CardProps> = ({
const getlogoLink = (i) => {
if (i === 'self' || link.includes('yuanshen.site') || isRelativeLink(link))
return withBase('/imgs/logo_128.png')
if (logo === '') return 'no-logo'
return i
if (i === '') return 'no-logo'
return isRelativeLink(i) ? withBase(i) : i
}

const children = [
Expand Down
4 changes: 3 additions & 1 deletion .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import googleAnalytics from '../plugins/googleAnalytics'
import Card from '../theme/components/Card'
import LinkGrid from '../theme/components/LinkGrid.vue'

import type { Theme } from 'vitepress'

import 'uno.css'
import './styles/vars.css'
import './styles/main.css'
Expand Down Expand Up @@ -57,7 +59,7 @@ export default {
}),
)
},
}
} satisfies Theme

const loadFont = () => {
const font = new FontFace('zh-cn-full', 'url(/docs/fonts/zh-cn-full.ttf)', {
Expand Down

0 comments on commit 6284097

Please sign in to comment.