Ryan Wang aee974185e docs: refine theme development documentation (#110)
完善 Halo 2.0 主题开发的文档。

/kind documentation

Fixes https://github.com/halo-dev/docs/issues/109

TODO list:

- [x] 准备工作 - 提供从搭建 Halo 开发环境到成功应用一个新的主题的过程。
- [x] 目录结构 - 详细解释一个主题的目录构成,包括每一个目录和文件的作用。
- [x] 配置文件 - 提供 `theme.yaml` 的各个配置的解释。
- [x] 设置选项 - 讲解如何在主题模板中使用主题定义的 `settings.yaml` 配置项。**注意:关于 settings.yaml 或许可以单独出一篇文档,因为插件也需要用到。主题和插件的文档只需要单独讲解如何使用**
- [x] 静态资源 - 讲解静态资源的引用。
- [x] 核心路由 - 列出 Halo 核心提供的路由以及模板,其中需要包括 `文章/自定义页面/分类的自定义模板` 的讲解
- [x] 模板变量 - 讲解系统内提供的路由对应模板中包含的变量。
- [x] Finder APIs - 讲解数据获取 API 的使用。
- [x] 常用代码片段 - 提供一些在主题开发中常用的代码片段,比如如何定义一个 `layout.html`,如何结构化渲染一个菜单或者文章分类等。

```release-note
None
```
2022-11-23 08:39:29 +00:00
2022-02-26 12:08:00 +08:00
2021-10-05 14:30:42 +08:00
2022-03-28 21:59:04 +08:00
2021-11-23 20:51:14 +08:00

The open-source repo for docs.halo.run

This website is built using Docusaurus 2, a modern static website generator.

Installation

$ pnpm install 

If you dont have pnpm installed, you can install it with the following command:

npm install -g pnpm

Local Development

$ pnpm start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

$ pnpm build

This command generates static content into the build directory and can be served using any static contents hosting service.

Description
The open-source repo for docs.halo.run
Readme 209 MiB
Languages
JavaScript 65%
TypeScript 19%
SCSS 12.6%
CSS 3.3%
Shell 0.1%