diff --git a/src/components/Footer.astro b/src/components/Footer.astro
index 89abdf1..31fa013 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/Widgets/LanguageSwitcher.astro b/src/components/Widgets/LanguageSwitcher.astro
index 55ef9a7..37d47d1 100644
--- a/src/components/Widgets/LanguageSwitcher.astro
+++ b/src/components/Widgets/LanguageSwitcher.astro
@@ -1,4 +1,5 @@
---
+import { moreLocales } from '@/config'
import { getNextGlobalLangPath, getNextSupportedLangPath } from '@/i18n/path'
import { isPostPage, isTagPage } from '@/utils/page'
@@ -11,6 +12,9 @@ const currentPath = Astro.url.pathname
const isPost = isPostPage(currentPath)
const isTag = isTagPage(currentPath)
+// Check if there are other languages to switch
+const showLanguageSwitcher = moreLocales.length > 0
+
// Check if only the supported language switch list is used
const useSupportedLangs = isPost || (isTag && supportedLangs.length > 0)
@@ -20,18 +24,20 @@ const nextUrl = useSupportedLangs
: getNextGlobalLangPath(currentPath) // Switch between all languages
---
-
-
-
+
+
+)}
diff --git a/src/content/config.ts b/src/content/config.ts
index 906f90b..26b13f2 100644
--- a/src/content/config.ts
+++ b/src/content/config.ts
@@ -1,6 +1,7 @@
import { allLocales } from '@/config'
import { defineCollection, z } from 'astro:content'
+// Posts collection
const postsCollection = defineCollection({
schema: z.object({
// required
@@ -22,6 +23,7 @@ const postsCollection = defineCollection({
}),
})
+// About page
const aboutCollection = defineCollection({
schema: z.object({
lang: z.enum(['', ...allLocales]).optional().default(''),
diff --git a/src/layouts/Head.astro b/src/layouts/Head.astro
index 0446ed8..f42b895 100644
--- a/src/layouts/Head.astro
+++ b/src/layouts/Head.astro
@@ -24,15 +24,16 @@ const { commentURL = '', imageHostURL = '', customGoogleAnalyticsJS = '', custom
const initMetaTheme = mode === 'dark' ? darkMode : lightMode
const headTitle = i18nTitle ? currentUI.title : title
const headSubtitle = i18nTitle ? currentUI.subtitle : subtitle
+
const pageTitle = postTitle ? `${postTitle} | ${headTitle}` : `${headTitle} - ${headSubtitle}`
const pageDescription = postDescription || description
-// TODO: Change openGraph image fallback url
const pageImage = postSlug
? `${url}/og/${postSlug}.png`
: apiflashKey
? `https://api.apiflash.com/v1/urltoimage?access_key=${apiflashKey}&url=${url}${langCode}&format=png&width=1500&height=788&ttl=86400&wait_until=network_idle&no_tracking=true`
: `https://api.apiflash.com/v1/urltoimage?access_key=02a837b6188f4ba0a7fd9fbeff03a83e&url=https://retypeset.radishzz.cc${langCode}&format=png&width=1500&height=788&ttl=604800&wait_until=network_idle&no_tracking=true`
---
+
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index edef7cd..4f986c4 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -27,7 +27,7 @@ const { postTitle, postDescription, postSlug, supportedLangs = [] } = Astro.prop
const { isHome, isPost } = getPageInfo(Astro.url.pathname)
const { light: { background: lightMode }, dark: { background: darkMode } } = themeConfig.color
const fontStyle = themeConfig.global.fontStyle === 'serif' ? 'font-serif' : 'font-sans'
-const footerMarginClass = isPost && themeConfig.comment?.waline?.serverURL
+const mobileFooterMargin = isPost && themeConfig.comment?.waline?.serverURL
? 'mt-8'
: 'mt-12'
---
@@ -39,13 +39,16 @@ const footerMarginClass = isPost && themeConfig.comment?.waline?.serverURL
>
-
+
+
+
-
+
+