chore: unbind unocss shortcut

This commit is contained in:
radishzzz 2025-03-16 00:51:39 +00:00
parent 203d0f367b
commit 5f3d9bc3c2
11 changed files with 15 additions and 19 deletions

View file

@ -1,4 +1,5 @@
---
import type { CollectionEntry } from 'astro:content'
import Comments from '@/components/Comments/index.astro'
import PostDate from '@/components/PostDate.astro'
import { allLocales, defaultLocale } from '@/config'
@ -19,7 +20,7 @@ export async function getStaticPaths() {
const slugToLangs: Record<string, string[]> = {}
// 填充映射
posts.forEach((post) => {
posts.forEach((post: CollectionEntry<'posts'>) => {
const slug = post.data.abbrlink || post.slug
const lang = post.data.lang || defaultLocale
@ -55,7 +56,7 @@ export async function getStaticPaths() {
const paths: PathItem[] = []
// 默认语言的文章页面 (没有语言前缀)
posts.forEach((post) => {
posts.forEach((post: CollectionEntry<'posts'>) => {
if (import.meta.env.DEV || !post.data.draft) {
const slug = post.data.abbrlink || post.slug
const postLang = post.data.lang || defaultLocale
@ -77,7 +78,7 @@ export async function getStaticPaths() {
// 更多语言的文章页面 (有语言前缀)
allLocales.forEach((lang: string) => {
if (lang !== defaultLocale) {
posts.forEach((post) => {
posts.forEach((post: CollectionEntry<'posts'>) => {
if ((import.meta.env.DEV || !post.data.draft) && (post.data.lang === lang || post.data.lang === '')) {
const slug = post.data.abbrlink || post.slug
paths.push({

View file

@ -68,7 +68,7 @@ function getTagUrl(tagName: string): string {
href={getTagUrl(tagName)}
class={`uno-tags-style ${
tag === tagName
? 'uno-tag-active'
? 'border-secondary/75 text-primary'
: ''
}`}
>