mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-18 04:06:05 +02:00
feat: add multilingual theme introduction posts
- Added localized Retypeset theme introduction posts for multiple languages - Included posts in English, Spanish, Russian, Japanese, Chinese (Simplified and Traditional) - Standardized post structure with consistent metadata and content - Updated content configuration to support multilingual post entries
This commit is contained in:
parent
e43036ae3a
commit
d72ec58837
24 changed files with 425 additions and 669 deletions
|
@ -4,32 +4,24 @@ const postsCollection = defineCollection({
|
|||
schema: z.object({
|
||||
title: z.string(),
|
||||
published: z.date(),
|
||||
// Optional
|
||||
updated: z.date().optional(),
|
||||
tags: z.array(z.string()).optional().default([]),
|
||||
// For Open Graph
|
||||
description: z.string().optional().default(''),
|
||||
image: z.string().optional().default(''),
|
||||
// Extended Settings
|
||||
lang: z.string().optional().default(''),
|
||||
slug: z.string()
|
||||
.optional()
|
||||
.default('')
|
||||
.refine(
|
||||
(slug) => {
|
||||
if (!slug)
|
||||
return true
|
||||
return /^[\w\-]*$/.test(slug)
|
||||
},
|
||||
{
|
||||
message: 'Slug can only contain letters, numbers, hyphens and underscores',
|
||||
},
|
||||
),
|
||||
toc: z.boolean().optional().default(false),
|
||||
// Advanced
|
||||
pin: z.boolean().optional().default(false),
|
||||
toc: z.boolean().optional().default(false),
|
||||
draft: z.boolean().optional().default(false),
|
||||
lang: z.string().optional().default(''),
|
||||
slug: z.string().optional().default('').refine(
|
||||
slug => !slug || /^[\w\-]*$/.test(slug),
|
||||
{ message: 'Slug can only contain letters, numbers, hyphens and underscores' },
|
||||
),
|
||||
minutes: z.number().optional(),
|
||||
}),
|
||||
})
|
||||
|
||||
export const collections = {
|
||||
posts: postsCollection,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue