chore: remove locale in mdx files

This commit is contained in:
javayhu 2025-04-05 10:51:12 +08:00
parent 573ae347ed
commit f5600631f7
16 changed files with 15 additions and 44 deletions

View File

@ -78,8 +78,7 @@ export const authors = defineCollection({
schema: (z) => ({
slug: z.string(),
name: z.string(),
avatar: z.string(),
locale: z.enum(LOCALES as [string, ...string[]]).optional()
avatar: z.string()
}),
transform: async (data, context) => {
// Get the filename from the path
@ -111,8 +110,7 @@ export const categories = defineCollection({
schema: (z) => ({
slug: z.string(),
name: z.string(),
description: z.string(),
locale: z.enum(LOCALES as [string, ...string[]]).optional()
description: z.string()
}),
transform: async (data, context) => {
// Get the filename from the path
@ -157,7 +155,6 @@ export const posts = defineCollection({
published: z.boolean().default(true),
categories: z.array(z.string()),
author: z.string(),
locale: z.enum(LOCALES as [string, ...string[]]).optional(),
estimatedTime: z.number().optional() // Reading time in minutes
}),
transform: async (data, context) => {
@ -238,13 +235,12 @@ export const posts = defineCollection({
export const pages = defineCollection({
name: 'page',
directory: 'content/pages',
include: '**/*.{md,mdx}',
include: '**/*.mdx',
schema: (z) => ({
title: z.string(),
description: z.string(),
date: z.string().datetime(),
published: z.boolean().default(true),
locale: z.enum(LOCALES as [string, ...string[]]).optional()
published: z.boolean().default(true)
}),
transform: async (data, context) => {
// Use Fumadocs transformMDX for consistent MDX processing
@ -295,14 +291,13 @@ export const pages = defineCollection({
export const releases = defineCollection({
name: 'release',
directory: 'content/release',
include: '**/*.{md,mdx}',
include: '**/*.mdx',
schema: (z) => ({
title: z.string(),
description: z.string(),
date: z.string().datetime(),
version: z.string(),
published: z.boolean().default(true),
locale: z.enum(LOCALES as [string, ...string[]]).optional()
published: z.boolean().default(true)
}),
transform: async (data, context) => {
// Use Fumadocs transformMDX for consistent MDX processing

View File

@ -3,7 +3,6 @@ title: Cookie Policy
description: How we use cookies and similar technologies on our website
date: 2025-03-10T00:00:00.000Z
published: true
locale: en
---
## Introduction
@ -57,7 +56,4 @@ We may update our Cookie Policy from time to time. We will notify you of any cha
## Contact Us
If you have any questions about this Cookie Policy, please contact us:
- By email: support@example.com
- By visiting our website: [Contact Page](https://example.com/contact)
If you have any questions about this Cookie Policy, please [contact us](/contact).

View File

@ -3,7 +3,6 @@ title: Cookie 政策
description: 我们如何在网站上使用 Cookie 和类似技术
date: 2025-03-10T00:00:00.000Z
published: true
locale: zh
---
## 引言
@ -57,7 +56,4 @@ Cookie 是在您访问网站时存储在您设备上的小型文本文件。它
## 联系我们
如果您对本 Cookie 政策有任何疑问,请联系我们:
- 通过电子邮件support@example.com
- 通过访问我们的网站:[联系页面](https://example.com/contact)
如果您对本 Cookie 政策有任何疑问,请[联系我们](/contact)。

View File

@ -3,7 +3,6 @@ title: Privacy Policy
description: Our commitment to protecting your privacy and personal data
date: 2025-03-10T00:00:00.000Z
published: true
locale: en
---
## Introduction
@ -43,7 +42,4 @@ We may update our Privacy Policy from time to time. We will notify you of any ch
## Contact Us
If you have any questions about this Privacy Policy, please contact us:
- By email: support@example.com
- By visiting our website: [Contact Page](https://example.com/contact)
If you have any questions about this Privacy Policy, please [contact us](/contact).

View File

@ -3,7 +3,6 @@ title: 隐私政策
description: 我们致力于保护您的隐私和个人数据
date: 2025-03-10T00:00:00.000Z
published: true
locale: zh
---
## 引言
@ -43,7 +42,4 @@ locale: zh
## 联系我们
如果您对本隐私政策有任何疑问,请联系我们:
- 通过电子邮件support@example.com
- 通过访问我们的网站:[联系页面](https://example.com/contact)
如果您对本隐私政策有任何疑问,请[联系我们](/contact)。

View File

@ -3,7 +3,6 @@ title: Terms of Service
description: The terms and conditions governing the use of our services
date: 2025-03-10T00:00:00.000Z
published: true
locale: en
---
## Introduction
@ -49,7 +48,4 @@ We reserve the right to modify these Terms at any time. If we make changes, we w
## Contact Us
If you have any questions about these Terms, please contact us:
- By email: support@example.com
- By visiting our website: [Contact Page](https://example.com/contact)
If you have any questions about these Terms, please [contact us](/contact).

View File

@ -3,7 +3,6 @@ title: 服务条款
description: 管理我们服务使用的条款和条件
date: 2025-03-10T00:00:00.000Z
published: true
locale: zh
---
## 引言
@ -49,7 +48,4 @@ locale: zh
## 联系我们
如果您对这些条款有任何疑问,请联系我们:
- 通过电子邮件support@example.com
- 通过访问我们的网站:[联系页面](https://example.com/contact)
如果您对这些条款有任何疑问,请[联系我们](/contact)。

View File

@ -80,7 +80,7 @@
"description": "This is MkSaaS, an AI SaaS template built with modern technologies, helping you build your SaaS faster and better.",
"subtitle": "Learn more about our company, mission, and values",
"authorName": "MkSaaS",
"authorBio": "Fullstack Developer",
"authorBio": "AI SaaS Boilerplate",
"authorIntroduction": "👋 Hi there! This is MkSaaS, an AI SaaS template built with modern technologies, helping you build your SaaS faster and better. If you have any questions, welcome to contact me.",
"talkWithMe": "Talk with me"
},

View File

@ -76,7 +76,7 @@
"description": "MkSaaS 是一个使用最先进的技术栈构建的 AI SaaS 模板,它可以帮助你更快更好地构建你的 SaaS。如果你有任何问题欢迎联系我。",
"subtitle": "了解更多关于我们的公司、使命和价值观",
"authorName": "MkSaaS",
"authorBio": "全栈开发工程师",
"authorBio": "最好的 AI SaaS 模板",
"authorIntroduction": "👋 你好,这里是 MkSaaS一个使用最先进的技术栈构建的 AI SaaS 模板,它可以帮助你更快更好地构建你的 SaaS。如果你有任何问题欢迎联系我。",
"talkWithMe": "联系我"
},

View File

@ -38,7 +38,7 @@ export function DashboardSidebar({ ...props }: React.ComponentProps<typeof Sideb
className="data-[slot=sidebar-menu-button]:!p-1.5"
>
<LocaleLink href="/">
<Logo className="size-5 rounded-full" />
<Logo className="size-5" />
<span className="truncate font-semibold text-base">
{t('Metadata.name')}
</span>