mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 03:32:51 +02:00
refactor: refactoring project structure and components, optimizing internationalization and page presentation
This commit is contained in:
parent
6674cb7072
commit
d6cff842e1
37 changed files with 156 additions and 146 deletions
|
@ -1,6 +1,6 @@
|
|||
import type { CollectionEntry } from 'astro:content'
|
||||
import themeConfig from '@/config'
|
||||
import { langPath } from '@/utils/ui'
|
||||
import { langPath } from '@/utils/i18n/ui'
|
||||
import { getCollection } from 'astro:content'
|
||||
|
||||
// Type definitions
|
||||
|
@ -142,7 +142,7 @@ export async function getPostsGroupByTags(lang?: string) {
|
|||
|
||||
// Get all posts by specific tag
|
||||
export async function getPostsByTag(tag: string, lang?: string) {
|
||||
const posts = await getRegularPosts(lang)
|
||||
const posts = await getPosts(lang)
|
||||
return posts.filter((post: Post) =>
|
||||
post.data.tags?.includes(tag),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue