diff --git a/astro.config.ts b/astro.config.ts
index 571dddc..84547f1 100644
--- a/astro.config.ts
+++ b/astro.config.ts
@@ -24,7 +24,7 @@ import remarkSectionize from 'remark-sectionize'
// Project configuration and utilities
import UnoCSS from 'unocss/astro'
import { themeConfig } from './src/config'
-import { langMap } from './src/i18n/ui'
+import { langMap } from './src/i18n/config'
import { AdmonitionComponent } from './src/plugins/rehype-component-admonition'
import { GithubCardComponent } from './src/plugins/rehype-component-github-card'
import { parseDirectiveNode } from './src/plugins/remark-directive-rehype'
diff --git a/src/components/Comments/Waline.astro b/src/components/Comments/Waline.astro
index 8314bd7..936eb98 100644
--- a/src/components/Comments/Waline.astro
+++ b/src/components/Comments/Waline.astro
@@ -1,7 +1,6 @@
---
-import { themeConfig } from '@/config'
-import { defaultLocale } from '@/i18n/config'
-import { walineLocaleMap } from '@/i18n/ui'
+import { defaultLocale, themeConfig } from '@/config'
+import { walineLocaleMap } from '@/i18n/config'
// Theme color configuration
const {
diff --git a/src/components/Footer.astro b/src/components/Footer.astro
index 0be0d1a..89abdf1 100644
--- a/src/components/Footer.astro
+++ b/src/components/Footer.astro
@@ -24,7 +24,7 @@ const year = Number(startYear) === currentYear
className,
]}
>
-
+
diff --git a/src/components/PostList.astro b/src/components/PostList.astro
index b6c62c5..6996367 100644
--- a/src/components/PostList.astro
+++ b/src/components/PostList.astro
@@ -1,6 +1,6 @@
---
import PostTime from '@/components/PostTime.astro'
-import { defaultLocale } from '@/i18n/config'
+import { defaultLocale } from '@/config'
interface Post {
data: {
@@ -16,7 +16,6 @@ interface Post {
}
}
-// Get post list and page language parameter from props
const { posts, lang } = Astro.props
export interface Props {
@@ -24,9 +23,8 @@ export interface Props {
lang?: string
}
-// Get multilingual post URL path
function getPostPath(post: Post) {
- // If abbrlink is set, it will be used instead of slug
+ // Prioritize abbrlink over slug
const postPath = post.data.abbrlink || post.slug
// Add language prefix to URL if current page is in a language subdirectory and not the default language
return lang && lang !== defaultLocale ? `/${lang}/posts/${postPath}/` : `/posts/${postPath}/`
diff --git a/src/components/Widgets/ThemeToggle.astro b/src/components/Widgets/ThemeToggle.astro
index 13b183b..676e70e 100644
--- a/src/components/Widgets/ThemeToggle.astro
+++ b/src/components/Widgets/ThemeToggle.astro
@@ -1,5 +1,4 @@