Skip to content

Commit

Permalink
fix : wrong link of post tags
Browse files Browse the repository at this point in the history
  • Loading branch information
laplacetw committed Oct 14, 2023
1 parent b3758e2 commit fefc8d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .vitepress/theme/components/PostFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { data as posts } from '../posts.data'
import themeConfig from '../config'
const root = themeConfig.base ? themeConfig.base.slice(0, -1) : ''
const tagsURL = `${root}/tags#tagName`
const { frontmatter } = useData()
let postIndex: number,
prevIndex: number,
Expand All @@ -32,7 +33,7 @@ function selectTag(tag: string) {

<template>
<div class='flex flex-wrap justify-center'>
<a v-for='tag in frontmatter.tags' href='/tags#tagName' @click='selectTag(tag)'
<a v-for='tag in frontmatter.tags' :href='tagsURL' @click='selectTag(tag)'
class='justify-self-center text-gray-500 dark:text-gray-300 my-1'>
<span class='theme-badge'>{{ tag }}</span>
</a>
Expand Down

0 comments on commit fefc8d9

Please sign in to comment.