From aff6e0c4f250748c22456dbd6ff8ff06e07f5976 Mon Sep 17 00:00:00 2001 From: radishzzz Date: Thu, 29 May 2025 00:11:01 +0100 Subject: [PATCH] docs: update theme guide --- src/content/posts/guides/Theme Guide-en.md | 11 ++++++++- src/content/posts/guides/Theme Guide-es.md | 11 ++++++++- src/content/posts/guides/Theme Guide-ja.md | 11 ++++++++- src/content/posts/guides/Theme Guide-ru.md | 23 +++++++++++++------ src/content/posts/guides/Theme Guide-zh-tw.md | 13 +++++++++-- src/content/posts/guides/Theme Guide-zh.md | 13 +++++++++-- 6 files changed, 68 insertions(+), 14 deletions(-) diff --git a/src/content/posts/guides/Theme Guide-en.md b/src/content/posts/guides/Theme Guide-en.md index 0acd8ca..d5cd216 100644 --- a/src/content/posts/guides/Theme Guide-en.md +++ b/src/content/posts/guides/Theme Guide-en.md @@ -282,10 +282,19 @@ body{color:oklch(25% 0.005 298)} /* Font color */ ## Creating a New Post -Create a new file with `.md` or `.mdx` extension in the `src/content/posts/` directory, and add `Front Matter` metadata at the top of the file. +Run `pnpm new-post ` to create a new post, which can then be edited in the `src/content/posts/` directory. + +```bash +pnpm new-post -> src/content/posts/new-post.md +pnpm new-post first-post -> src/content/posts/first-post.md +pnpm new-post 2025/03/first-post -> src/content/posts/2025/03/first-post.md +pnpm new-post first-post.mdx -> src/content/posts/first-post.mdx +``` ### Front Matter +Only `title` and `published` are required fields, all other configurations can be safely omitted. + ```markdown --- # Required diff --git a/src/content/posts/guides/Theme Guide-es.md b/src/content/posts/guides/Theme Guide-es.md index 1b84051..0995455 100644 --- a/src/content/posts/guides/Theme Guide-es.md +++ b/src/content/posts/guides/Theme Guide-es.md @@ -282,10 +282,19 @@ body{color:oklch(25% 0.005 298)} /* Color de fuente */ ## Creación de un Nuevo Artículo -Crea un nuevo archivo con extensión `.md` o `.mdx` en el directorio `src/content/posts/`, y añade los metadatos `Front Matter` en la parte superior del archivo. +Ejecuta `pnpm new-post ` para crear un nuevo artículo, que luego puede editarse en el directorio `src/content/posts/`. + +```bash +pnpm new-post -> src/content/posts/new-post.md +pnpm new-post first-post -> src/content/posts/first-post.md +pnpm new-post 2025/03/first-post -> src/content/posts/2025/03/first-post.md +pnpm new-post first-post.mdx -> src/content/posts/first-post.mdx +``` ### Front Matter +Solo los campos `title` y `published` son obligatorios, todas las demás configuraciones pueden omitirse de forma segura. + ```markdown --- # Obligatorio diff --git a/src/content/posts/guides/Theme Guide-ja.md b/src/content/posts/guides/Theme Guide-ja.md index 33698a9..34f5526 100644 --- a/src/content/posts/guides/Theme Guide-ja.md +++ b/src/content/posts/guides/Theme Guide-ja.md @@ -282,10 +282,19 @@ body{color:oklch(25% 0.005 298)} /* フォントカラー */ ## 新しい記事の作成 -`src/content/posts/` ディレクトリに `.md` または `.mdx` 拡張子を持つ新しいファイルを作成し、ファイルの先頭に `Front Matter` メタデータを追加します。 +`pnpm new-post ` を実行して新しい記事を作成し、`src/content/posts/` ディレクトリで編集できます。 + +```bash +pnpm new-post -> src/content/posts/new-post.md +pnpm new-post first-post -> src/content/posts/first-post.md +pnpm new-post 2025/03/first-post -> src/content/posts/2025/03/first-post.md +pnpm new-post first-post.mdx -> src/content/posts/first-post.mdx +``` ### Front Matter +`title` と `published` のみが必須フィールドで、他のすべての設定は安全に省略できます。 + ```markdown --- # 必須 diff --git a/src/content/posts/guides/Theme Guide-ru.md b/src/content/posts/guides/Theme Guide-ru.md index de0af99..fec151c 100644 --- a/src/content/posts/guides/Theme Guide-ru.md +++ b/src/content/posts/guides/Theme Guide-ru.md @@ -282,10 +282,19 @@ body{color:oklch(25% 0.005 298)} /* Цвет шрифта */ ## Создание новой статьи -Создайте новый файл с расширением `.md` или `.mdx` в директории `src/content/posts/`, и добавьте метаданные `Front Matter` в верхней части файла. +Выполните команду `pnpm new-post ` для создания новой статьи, которую затем можно редактировать в директории `src/content/posts/`. + +```bash +pnpm new-post -> src/content/posts/new-post.md +pnpm new-post first-post -> src/content/posts/first-post.md +pnpm new-post 2025/03/first-post -> src/content/posts/2025/03/first-post.md +pnpm new-post first-post.mdx -> src/content/posts/first-post.mdx +``` ### Front Matter +Только поля `title` и `published` являются обязательными, все остальные конфигурации можно безопасно опустить. + ```markdown --- # Обязательные @@ -332,15 +341,15 @@ abbrlink: theme-guide # moreLocales: ['es', 'ru'] # lang: '' -src/content/posts/apple.md -> example.com/posts/apple/ - -> example.com/es/posts/apple/ - -> example.com/ru/posts/apple/ +src/content/posts/apple.md -> example.com/posts/apple/ + -> example.com/es/posts/apple/ + -> example.com/ru/posts/apple/ # lang: en -src/content/posts/apple.md -> example.com/posts/apple/ +src/content/posts/apple.md -> example.com/posts/apple/ # lang: es -src/content/posts/apple.md -> example.com/es/posts/apple/ +src/content/posts/apple.md -> example.com/es/posts/apple/ # lang: ru -src/content/posts/apple.md -> example.com/ru/posts/apple/ +src/content/posts/apple.md -> example.com/ru/posts/apple/ ``` #### abbrlink diff --git a/src/content/posts/guides/Theme Guide-zh-tw.md b/src/content/posts/guides/Theme Guide-zh-tw.md index 00053cb..4929208 100644 --- a/src/content/posts/guides/Theme Guide-zh-tw.md +++ b/src/content/posts/guides/Theme Guide-zh-tw.md @@ -282,11 +282,20 @@ body{color:oklch(25% 0.005 298)} /* 字體顏色 */ ## 創建新文章 -在 `src/content/posts/` 目錄中新建以 `.md` 或 `.mdx` 為後綴的文件,並在文件頂部添加 `Front Matter` 元數據。 +執行 `pnpm new-post ` 創建新文章,可在 `src/content/posts/` 目錄中編輯。 + +```bash +pnpm new-post -> src/content/posts/new-post.md +pnpm new-post first-post -> src/content/posts/first-post.md +pnpm new-post 2025/03/first-post -> src/content/posts/2025/03/first-post.md +pnpm new-post first-post.mdx -> src/content/posts/first-post.mdx +``` ### Front Matter -```markdown +`title` 和 `published` 為必填項,其餘配置均可安全刪除。 + +```md --- # 必填 title: 主題上手指南 diff --git a/src/content/posts/guides/Theme Guide-zh.md b/src/content/posts/guides/Theme Guide-zh.md index 62c0591..c84f87a 100644 --- a/src/content/posts/guides/Theme Guide-zh.md +++ b/src/content/posts/guides/Theme Guide-zh.md @@ -282,11 +282,20 @@ body{color:oklch(25% 0.005 298)} /* 字体颜色 */ ## 创建新文章 -在 `src/content/posts/` 目录中新建以 `.md` 或 `.mdx` 为后缀的文件,并在文件顶部添加 `Front Matter` 元数据。 +执行 `pnpm new-post ` 创建新文章,可在 `src/content/posts/` 目录中编辑。 + +```bash +pnpm new-post -> src/content/posts/new-post.md +pnpm new-post first-post -> src/content/posts/first-post.md +pnpm new-post 2025/03/first-post -> src/content/posts/2025/03/first-post.md +pnpm new-post first-post.mdx -> src/content/posts/first-post.mdx +``` ### Front Matter -```markdown +`title` 和 `published` 为必填项,其余配置均可安全删除。 + +```md --- # 必填 title: 主题上手指南