refactor: organize and categorize functions

This commit is contained in:
radishzzz 2025-03-14 16:18:17 +00:00
parent f5526f8622
commit d352b6fb65
13 changed files with 150 additions and 176 deletions

View file

@ -1,6 +1,6 @@
---
import themeConfig from '@/config'
import { getPageInfo } from '@/i18n/path'
import { getPageInfo } from '@/utils/page'
const { title, subtitle } = themeConfig.site
const { titleSpace } = themeConfig.global

View file

@ -1,6 +1,6 @@
---
import themeConfig from '@/config'
import { getPageInfo } from '@/i18n/path'
import { getPageInfo } from '@/utils/page'
const { title, subtitle } = themeConfig.site
const { titleSpace } = themeConfig.global

View file

@ -1,6 +1,6 @@
---
import { getPageInfo } from '@/i18n/path'
import { ui } from '@/i18n/ui'
import { getPageInfo } from '@/utils/page'
const { currentLang, isHome, isPost, isTag, isAbout, getLocalizedPath }
= getPageInfo(Astro.url.pathname)

View file

@ -1,6 +1,6 @@
---
import { themeConfig } from '@/config'
import { isPostPage } from '@/i18n/path'
import { isPostPage } from '@/utils/page'
interface Props {
date: Date

View file

@ -1,6 +1,6 @@
---
import { getNextLangUrl, getPostNextLangUrl } from '@/i18n/lang'
import { isPostPage } from '@/i18n/path'
import { getNextLangUrl, getPostNextLangUrl } from '@/i18n/path'
import { isPostPage } from '@/utils/page'
interface Props {
supportedLangs: string[]