Skip to content

Commit 5e52751

Browse files
authored
docs: add dev-skills documentation for theme and plugin development (#592)
## Summary Add AI-assisted development section to theme and plugin prepare guides, introducing the [halo-dev/dev-skills](https://github.com/halo-dev/dev-skills) repository for Cursor, Claude Code, and other AI agents. ## Changes - `docs/developer-guide/theme/prepare.md` - `docs/developer-guide/plugin/prepare.md` - `versioned_docs/version-2.24/developer-guide/theme/prepare.md` - `versioned_docs/version-2.24/developer-guide/plugin/prepare.md` Each file now includes a new \"AI-assisted development\" section that: 1. Mentions the `halo-dev/dev-skills` repository 2. Describes the available skills (`halo-theme-dev` and `halo-plugin-dev`) 3. Provides the installation command via Skills CLI ```release-note None ```
1 parent 6ec61ed commit 5e52751

4 files changed

Lines changed: 48 additions & 0 deletions

File tree

docs/developer-guide/plugin/prepare.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,15 @@ description: 插件开发的准备工作
1515
- Git 是一个版本控制系统,用于跟踪代码的更改,您需要 Git 来下载示例插件并发布插件。
1616

1717
同时需要先阅读 [Halo 架构概览](../core/framework.md) 以了解 Halo 的核心概念和技术栈。
18+
19+
## AI 辅助开发
20+
21+
Halo 官方为插件开发者提供了 Agent Skills,支持在 Cursor、Claude Code、Codex 等 AI 开发工具中使用,以获得 Halo 插件开发的深度上下文和辅助能力。
22+
23+
- [halo-dev/dev-skills](https://github.com/halo-dev/dev-skills) - 包含 `halo-plugin-dev` Skill,涵盖插件目录结构、Java 后端开发、Vue 3 前端开发、RBAC 权限管理、DevTools 工作流、OpenAPI 客户端生成等内容。
24+
25+
安装方式:
26+
27+
```bash
28+
npx skills add halo-dev/dev-skills@halo-plugin-dev -g
29+
```

docs/developer-guide/theme/prepare.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,18 @@ spec:
7575
创建新的主题仓库并克隆到本地开发环境之后,需要确保主题文件夹名称和 `theme.yaml` 中的 `metadata.name` 字段一致,否则可能导致部分资源无法正常加载。
7676
:::
7777

78+
## AI 辅助开发
79+
80+
Halo 官方为主题开发者提供了 Agent Skills,支持在 Cursor、Claude Code、Codex 等 AI 开发工具中使用,以获得 Halo 主题开发的深度上下文和辅助能力。
81+
82+
- [halo-dev/dev-skills](https://github.com/halo-dev/dev-skills) - 包含 `halo-theme-dev` Skill,涵盖主题目录结构、Thymeleaf 模板、Finder API、静态资源管理、主题设置表单等内容,并提供了最小主题和 Vite 主题的初始模板。
83+
84+
安装方式:
85+
86+
```bash
87+
npx skills add halo-dev/dev-skills@halo-theme-dev -g
88+
```
89+
7890
## 创建第一个页面模板
7991

8092
Halo 使用 [Thymeleaf](https://www.thymeleaf.org/) 作为后端模板引擎,后缀为 `.html`,与单纯编写 HTML 一致。在 Halo 的主题中,主题的模板文件存放于 `templates` 目录下,例如 `~/halo2-dev/themes/theme-foo/templates`。为了此文档方便演示,我们先在 `templates` 创建一个首页的模板文件 `index.html`:

versioned_docs/version-2.24/developer-guide/plugin/prepare.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,15 @@ description: 插件开发的准备工作
1515
- Git 是一个版本控制系统,用于跟踪代码的更改,您需要 Git 来下载示例插件并发布插件。
1616

1717
同时需要先阅读 [Halo 架构概览](../core/framework.md) 以了解 Halo 的核心概念和技术栈。
18+
19+
## AI 辅助开发
20+
21+
Halo 官方为插件开发者提供了 Agent Skills,支持在 Cursor、Claude Code、Codex 等 AI 开发工具中使用,以获得 Halo 插件开发的深度上下文和辅助能力。
22+
23+
- [halo-dev/dev-skills](https://github.com/halo-dev/dev-skills) - 包含 `halo-plugin-dev` Skill,涵盖插件目录结构、Java 后端开发、Vue 3 前端开发、RBAC 权限管理、DevTools 工作流、OpenAPI 客户端生成等内容。
24+
25+
安装方式:
26+
27+
```bash
28+
npx skills add halo-dev/dev-skills@halo-plugin-dev -g
29+
```

versioned_docs/version-2.24/developer-guide/theme/prepare.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,18 @@ spec:
7575
创建新的主题仓库并克隆到本地开发环境之后,需要确保主题文件夹名称和 `theme.yaml` 中的 `metadata.name` 字段一致,否则可能导致部分资源无法正常加载。
7676
:::
7777

78+
## AI 辅助开发
79+
80+
Halo 官方为主题开发者提供了 Agent Skills,支持在 Cursor、Claude Code、Codex 等 AI 开发工具中使用,以获得 Halo 主题开发的深度上下文和辅助能力。
81+
82+
- [halo-dev/dev-skills](https://github.com/halo-dev/dev-skills) - 包含 `halo-theme-dev` Skill,涵盖主题目录结构、Thymeleaf 模板、Finder API、静态资源管理、主题设置表单等内容,并提供了最小主题和 Vite 主题的初始模板。
83+
84+
安装方式:
85+
86+
```bash
87+
npx skills add halo-dev/dev-skills@halo-theme-dev -g
88+
```
89+
7890
## 创建第一个页面模板
7991

8092
Halo 使用 [Thymeleaf](https://www.thymeleaf.org/) 作为后端模板引擎,后缀为 `.html`,与单纯编写 HTML 一致。在 Halo 的主题中,主题的模板文件存放于 `templates` 目录下,例如 `~/halo2-dev/themes/theme-foo/templates`。为了此文档方便演示,我们先在 `templates` 创建一个首页的模板文件 `index.html`:

0 commit comments

Comments
 (0)