diff --git a/docs/getting-started/install/1panel.md b/docs/getting-started/install/1panel.md index 5d29d80..a264f57 100644 --- a/docs/getting-started/install/1panel.md +++ b/docs/getting-started/install/1panel.md @@ -28,7 +28,7 @@ import DockerArgs from "./slots/_docker-args.md" ### 安装基础软件 -在安装 Halo 之前,我们需要先在 1Panel 上安装好所需的软件,包括 OpenResty 和 MySQL。在接下来的文档中,我们会默认你已经安装好了这两个软件,并不再赘述。 +在安装 Halo 之前,我们需要先在 1Panel 上安装好所需的软件,包括 OpenResty 和数据库(MySQL、PostgreSQL、MariaDB 都可以)。在接下来的文档中,我们会默认你已经安装好了这两个软件,并不再赘述。 ![OpenResty 和 MySQL](/img/install/1panel/openresty-mysql.png) @@ -45,12 +45,11 @@ import DockerArgs from "./slots/_docker-args.md" 参数说明: - **名称**:要创建的 Halo 应用的名称。 +- **版本**:选择最新的版本即可。 - **数据库服务**:Halo 应用使用的数据库应用,支持下拉选择已安装的数据库应用,1Panel 会自动配置 Halo 使用该数据库。 - **数据库名**:Halo 应用使用的数据库名称,1Panel 会在选中的数据库中自动创建这个数据库。 - **数据库用户**:Halo 应用使用的数据库用户名,1Panel 会在选中的数据库中自动创建这个用户,并添加对应的数据库授权。 - **数据库用户密码**:Halo 应用使用的数据库用户密码,1Panel 会在选中的数据库中自动为上一步创建的用户配置该密码。 -- **超级管理员用户名**:Halo 应用初始化创建的超级管理员用户名。 -- **超级管理员密码**:Halo 应用初始化创建的超级管理员密码。 - **外部访问地址**:Halo 应用的最终访问地址,如果有为 Halo 规划域名,需要配置为域名格式,例如 `http://halo.example.com`。否则配置为 `http://服务器IP:PORT`,例如 `http://192.168.1.1:8090`。 - **端口**:Halo 应用的服务端口。 @@ -58,10 +57,6 @@ import DockerArgs from "./slots/_docker-args.md" ![Halo 运行状态](/img/install/1panel/halo-status.png) -此时便可以通过配置的外部访问地址来访问 Halo 了。 - -![访问 Halo](/img/install/1panel/halo-console.png) - ## 创建网站 完成 Halo 应用的安装后,此时并不会自动创建一个网站,我们需要手动创建一个网站,然后将 Halo 应用绑定到这个网站上才能使用域名访问。 @@ -73,6 +68,6 @@ import DockerArgs from "./slots/_docker-args.md" 1. 在已装应用中选择我们刚刚新建的 Halo 应用。 2. 正确填写主域名,需要注意的是需要提前解析好域名到服务器 IP。 -最后,点击确认按钮,等待网站创建完成。 +最后,点击确认按钮,等待网站创建完成即可访问网站进行 [初始化](../setup.md)。 ![网站列表](/img/install/1panel/site.png) diff --git a/docs/getting-started/migrate-from-1.x.md b/docs/getting-started/migrate-from-1.x.md index dec94e6..bf73918 100644 --- a/docs/getting-started/migrate-from-1.x.md +++ b/docs/getting-started/migrate-from-1.x.md @@ -7,19 +7,15 @@ description: 从 Halo 1.x 迁移的完整指南和注意事项 - Halo 版本必须为 1.5.x 或 1.6.x。如果不满足,需要先升级到 1.5.x 或 1.6.x 版本。 - Halo 2.0 不兼容 1.x 的主题,建议在升级前先查询你正在使用的主题是否已经支持 2.0。你可以访问 [halo-sigs/awesome-halo](https://github.com/halo-sigs/awesome-halo) 或 [应用市场](https://www.halo.run/store/apps?type=THEME) 查阅目前支持的主题。 -- Halo 2.0 目前没有内置 Markdown 编辑器,如果需要重新编辑迁移后的文章,需要额外安装 Markdown 编辑器插件。目前社区已经提供了以下插件: - - StackEdit:[https://www.halo.run/store/apps/app-hDXMG](https://www.halo.run/store/apps/app-hDXMG) - - ByteMD:[https://www.halo.run/store/apps/app-HTyhC](https://www.halo.run/store/apps/app-HTyhC) +- Halo 2.0 目前没有内置 Markdown 编辑器,如果需要重新编辑迁移后的文章,需要额外安装 Markdown 编辑器插件,可以在应用市场找到合适的 Markdown 插件:[https://www.halo.run/store/apps?tag=editor](https://www.halo.run/store/apps?tag=editor) - Halo 2.0 不再内置友情链接、日志、图库等模块,需要安装额外的插件,目前官方已提供: - 链接管理:[https://www.halo.run/store/apps/app-hfbQg](https://www.halo.run/store/apps/app-hfbQg) - 图库:[https://www.halo.run/store/apps/app-BmQJW](https://www.halo.run/store/apps/app-BmQJW) - 瞬间(原日志):[https://www.halo.run/store/apps/app-SnwWD](https://www.halo.run/store/apps/app-SnwWD) - Halo 2.0 不再内置外部云存储的支持。需要安装额外的插件,目前官方已提供: - S3(兼容国内主流的云存储):[https://www.halo.run/store/apps/app-Qxhpp](https://www.halo.run/store/apps/app-Qxhpp) - - 阿里云 OSS:[https://www.halo.run/store/apps/app-wCJCD](https://www.halo.run/store/apps/app-wCJCD) - 在迁移过程中不会保留旧版本的用户数据,迁移完成之后,关于文章等数据的关联都将改为 Halo 2.0 的新用户。 - 为了防止直接升级 2.0 导致 1.x 的数据受到破坏,我们已经将工作目录由 `~/.halo` 变更为 `~/.halo2`。 -- 目前 Halo 2.0 仅提供 Docker 部署方式,没有提供可执行 JAR 包,但可以自编译,请参考 [构建](../developer-guide/core/build.md) 文档 - 可以考虑先在本地运行一个 Halo 2.0,模拟一下导入,检查导入后是否满足要求。 如果遇到了迁移过程中的问题,也可以向我们提交 Issue: [https://github.com/halo-dev/halo/issues/new/choose](https://github.com/halo-dev/halo/issues/new/choose),以上暂不支持的功能我们也会陆续完善。 @@ -32,7 +28,7 @@ description: 从 Halo 1.x 迁移的完整指南和注意事项 在 Halo 1.5.x / 1.6.x 后台的小工具中提供了数据导出的功能,将最新的数据进行备份,然后下载即可。这个数据文件包含了数据库所有的数据,后续我们在 2.0 的导入插件中就是通过这个文件进行数据导入。 -![halo-data-export.png](/img/halo-data-export.png) +![Halo 1.6 export data](/img/migrate/halo1.6-export.png) ## 部署 Halo 2.0 @@ -40,6 +36,7 @@ description: 从 Halo 1.x 迁移的完整指南和注意事项 - [使用 Docker 部署](./install/docker.md) - [使用 Docker Compose 部署](./install/docker-compose.md) +- [使用 JAR 文件部署](./install/jar-file.md) :::tip 可以考虑暂时保留旧版本的 Halo,等到迁移完成之后再移除。如果需要保留旧版本的 Halo,请注意在部署 Halo 2.0 的时候使用其他端口,然后在反向代理(Nginx)中修改为 Halo 2.0 的运行端口即可。 @@ -67,14 +64,19 @@ description: 从 Halo 1.x 迁移的完整指南和注意事项 1. 安装 S3 插件。 2. 进入附件管理页面。 3. 点击页面右上角的 **存储策略** 按钮。 -4. 创建存储策略,选择 **S3 Object Storage**。 +4. 创建存储策略,选择 **S3 对象存储**。 5. 填写相关配置,点击 **保存** 即可。 ## 迁移 -![Migrate Plugin](/img/migrate/halo2.0-migrate-plugin.png) +![Migrate Plugin 1](/img/migrate/halo2.0-migrate-plugin-1.png) + +![Migrate Plugin 2](/img/migrate/halo2.0-migrate-plugin-2.png) + +![Migrate Plugin 3](/img/migrate/halo2.0-migrate-plugin-3.png) 1. 点击左侧菜单的迁移进入迁移页面。 -2. 点击 **选择文件** 按钮,选择在 Halo 1.5.x / 1.6.x 导出的数据文件(JSON 格式)。 -3. 如果在 1.x 中使用了云存储,会弹出选择云存储的对话框,选择之前创建的存储策略即可。 -4. 最后点击页面下方的 **执行导入** 即可。 +2. 选择 **Halo 1.5 / 1.6 数据迁移**。 +3. 点击 **选择文件** 按钮,选择在 Halo 1.5.x / 1.6.x 导出的数据文件(JSON 格式)。 +4. 如果在 1.x 中使用了云存储,会弹出选择云存储的对话框,选择之前创建的存储策略即可。 +5. 最后点击页面下方的 **执行导入** 即可。 diff --git a/docs/user-guide/attachments.md b/docs/user-guide/attachments.md index f45fead..36e632b 100644 --- a/docs/user-guide/attachments.md +++ b/docs/user-guide/attachments.md @@ -10,10 +10,9 @@ description: 附件管理相关功能说明 Halo 默认提供了本地的存储策略类型,你还可以通过安装插件的方式扩展其他的存储策略类型。一个存储策略包含了存储提供者,具体存储位置等使用该类型存储所必要的各种信息。 :::info -目前 Halo 官方维护了两个存储策略插件,可以根据需要选择安装: +目前除了 Halo 内置的本地存储,在应用市场中也有三方的存储插件:[https://www.halo.run/store/apps?tag=storage](https://www.halo.run/store/apps?tag=storage) -1. 阿里云 OSS:[https://www.halo.run/store/apps/app-wCJCD](https://www.halo.run/store/apps/app-wCJCD) -2. Amazon S3 协议(主流云存储厂商均支持):[https://www.halo.run/store/apps/app-Qxhpp](https://www.halo.run/store/apps/app-Qxhpp) +此外,如果你期望对接类似于阿里云、腾讯云的对象存储,可以考虑使用 [对象存储(Amazon S3 协议)](https://www.halo.run/store/apps/app-Qxhpp) 插件,此插件兼容市面上所有支持 S3 协议的对象存储厂商。 ::: 你可以点击附件页面右上角的 `存储策略` 按钮对存储策略进行管理。 @@ -24,7 +23,7 @@ Halo 默认提供了本地的存储策略类型,你还可以通过安装插件 ![添加存储策略](/img/user-guide/attachments/attachment-policy-add.png) -添加时首先需要选择一种存储策略类型,系统内置的存储策略为本地存储,图中的 `S3 Object Storage` 由[对象存储(Amazon S3 协议)](https://www.halo.run/store/apps/app-Qxhpp)提供,此文档以本地存储为例。 +添加时首先需要选择一种存储策略类型,系统内置的存储策略为本地存储,图中的 `S3 对象存储` 由[对象存储(Amazon S3 协议)](https://www.halo.run/store/apps/app-Qxhpp)提供,此文档以本地存储为例。 ![添加本地存储策略](/img/user-guide/attachments/attachment-policy-add-local.png) @@ -74,8 +73,8 @@ Halo 目前提供了两种分组删除策略: ![上传附件](/img/user-guide/attachments/attachment-upload.png) -1. **分组选择**:你可以选择需要上传到的分组,为了方便,选择之后会在浏览器记住这个选项。 -2. **存储策略选择**:你可以选择需要使用的存储策略,为了方便,选择之后会在浏览器记住这个选项。 +1. **存储策略选择**:你可以选择需要使用的存储策略,为了方便,选择之后会在浏览器记住这个选项。 +2. **分组选择**:你可以选择需要上传到的分组,为了方便,选择之后会在浏览器记住这个选项。 3. **上传区域**:同时支持拖拽文件、点击上传区域选择文件、粘贴文件。 ## 查看附件 diff --git a/docs/user-guide/common.md b/docs/user-guide/common.md index 44c249a..95a02b0 100644 --- a/docs/user-guide/common.md +++ b/docs/user-guide/common.md @@ -6,15 +6,21 @@ Halo 作为一款好用又强大的开源建站工具,配合上不同的模板 为了更好地发挥出 Halo 的价值,这里有一些基本概念需要你进行了解。 +## 登录 + +Halo 的统一登录入口为 `/login`。 + +![Login](/img/user-guide/common/login.png) + +## 注册 + +Halo 的注册地址为 `/signup`,需要注意的是,Halo 默认不会开启注册功能,需要在设置页面的 [用户设置](./settings.md#用户设置) 中手动开启。 + +![Signup](/img/user-guide/common/signup.png) + ## 控制台 -控制台是一个 Halo 站点的后台管理系统,只有具有权限的登录用户才可以正常使用控制台功能。你可以在控制台中管理站点中的文章、页面、附件等各种内容,调整站点使用的主题或各种设置。 - -:::info -控制台的访问入口为 `/console`。忘记密码请参考[常见问题中的忘记密码章节](../user-guide/faq.md#忘记密码怎么办)进行处理。 -::: - -### 界面说明 +Console 控制台是一个 Halo 站点的后台管理系统,只有具有权限的登录用户才可以正常使用控制台功能。你可以在控制台中管理站点中的文章、页面、附件等各种内容,调整站点使用的主题或各种设置,访问地址为 `/console`。 ![控制台界面说明](/img/user-guide/common/控制台界面说明.png) diff --git a/docs/user-guide/faq.md b/docs/user-guide/faq.md index f738757..3fbe14f 100644 --- a/docs/user-guide/faq.md +++ b/docs/user-guide/faq.md @@ -7,50 +7,55 @@ description: 使用上的常见问题 **Halo** [ˈheɪloʊ],是一款好用又强大的[开源建站工具](https://github.com/halo-dev/halo),配合上不同的模板与插件,可以很好地帮助你构建你心中的理想站点。它可以是你公司的官方网站,可以是你的个人博客,也可以是团队共享的知识库,甚至可以是一个论坛、一个商城。 +### 为什么 Halo 启动之后,数据库只有一张表? + +从 Halo 2.0 开始,为了方便插件扩展,能够方便的持久化数据,我们设计了一种自定义模型的方案,详情可参考 RFC:[自定义模型设计 +](https://github.com/halo-dev/rfcs/tree/main/extension) + ### 忘记密码怎么办? -1. 站点管理员已经配置好邮件通知,并且用户已完成电子邮箱验证时,可以点击登录页面的 `找回密码` 选项或直接访问 `/console/reset-password` 地址,填写用户名及对应邮箱后,系统将向该邮箱发送密码重置链接,用户可通过该链接重置密码; +1. 站点管理员已经配置好邮件通知,并且用户已完成电子邮箱验证时,可以点击登录页面的 `找回密码` 链接,填写邮箱后,系统将向该邮箱发送密码重置链接,用户可通过该链接重置密码; 2. 如果不满足上述条件,或者密码重置邮件不能发送成功,请直接联系具有用户管理权限的管理员进行密码重置操作,管理员可参考文档[修改用户密码](./users#修改用户密码)部分修改指定用户的密码; 3. 如果系统没有任何一个能够正常登录控制台且具有用户管理权限的管理员账号,则用户需要通过更新数据库记录的方式重置指定用户的密码。 - :::info 参考 SQL 语句 + :::info 参考 SQL 语句 - 通过以下 SQL 语句,可以将 `admin` 用户的密码重置为 `password`,密码重置后请尽快修改为更加安全的密码。 - - **PostgreSQL** 数据库 + 通过以下 SQL 语句,可以将 `admin` 用户的密码重置为 `password`,密码重置后请尽快修改为更加安全的密码。 - ```SQL - UPDATE - extensions - SET - data = convert_to( - jsonb_set( - convert_from(data, 'UTF-8') :: jsonb, - '{spec,password}', - '"{bcrypt}$2a$10$7tBEL1sNQSr/uWtLZHLmCeA9IGx0I9/Jz//3Uwo/anIm9xdxv.xrO"' - ) :: text, - 'UTF-8' - ) - WHERE - name LIKE '/registry/users/admin'; - ``` + **PostgreSQL** 数据库 - **MySQL** 数据库 + ```SQL + UPDATE + extensions + SET + data = convert_to( + jsonb_set( + convert_from(data, 'UTF-8') :: jsonb, + '{spec,password}', + '"{bcrypt}$2a$10$7tBEL1sNQSr/uWtLZHLmCeA9IGx0I9/Jz//3Uwo/anIm9xdxv.xrO"' + ) :: text, + 'UTF-8' + ) + WHERE + name LIKE '/registry/users/admin'; + ``` - ```SQL - UPDATE - extensions - SET - data = JSON_SET( - CONVERT(data USING utf8mb4), - '$.spec.password', - '{bcrypt}$2a$10$7tBEL1sNQSr/uWtLZHLmCeA9IGx0I9/Jz//3Uwo/anIm9xdxv.xrO' - ) - WHERE - name LIKE '/registry/users/admin'; - ``` - - ::: + **MySQL** 数据库 + + ```SQL + UPDATE + extensions + SET + data = JSON_SET( + CONVERT(data USING utf8mb4), + '$.spec.password', + '{bcrypt}$2a$10$7tBEL1sNQSr/uWtLZHLmCeA9IGx0I9/Jz//3Uwo/anIm9xdxv.xrO' + ) + WHERE + name LIKE '/registry/users/admin'; + ``` + + ::: ### 附件上传提示 `413 Request Entity Too Large` 如何解决? @@ -122,7 +127,7 @@ server { 前台样式不正常或者丢失有很多种问题的可能,最快捷定位问题的方式就是打开浏览器控制台查看具体请求的错误,以下列出了部分导致出现该问题的常见原因: -1. 后台设置的 `博客地址` 与实际访问地址不一致。也可能是开启了 https 之后,无法正常加载 http 资源,将 `博客地址` 改为 https 协议即可。 +1. `外部访问地址` 与实际访问地址不一致。也可能是开启了 https 之后,无法正常加载 http 资源,将 [外部访问地址](../getting-started/install/config.md#halo-独有配置) 改为 https 协议即可。 2. Nginx 配置了静态资源缓存,但没有设置 `proxy_pass`,参考如下: ```nginx diff --git a/docs/user-guide/plugins.md b/docs/user-guide/plugins.md index 401d104..fdc3fbe 100644 --- a/docs/user-guide/plugins.md +++ b/docs/user-guide/plugins.md @@ -53,7 +53,7 @@ description: 插件管理相关功能说明 ![插件设置](/img/user-guide/plugins/plugin-setting.png) -此处以 `plugin-umami` 插件为例。 +此处以 `Umami` 插件为例。 :::info 你可以点击插件列表指定插件所在行后方的 `···` 更多操作按钮,选择其中的 `重置` 选项将插件提供的设置项恢复为默认值。 diff --git a/docs/user-guide/posts.md b/docs/user-guide/posts.md index 2a4a9eb..82efba6 100644 --- a/docs/user-guide/posts.md +++ b/docs/user-guide/posts.md @@ -19,10 +19,7 @@ description: 文章管理相关功能说明 4. **发布**:保存并发布文章内容。 :::info -Halo 支持通过插件来拓展文章编辑器,目前 Halo 官方维护了另外两款编辑器插件,可以按需安装使用: - -1. StackEdit:[https://www.halo.run/store/apps/app-hDXMG](https://www.halo.run/store/apps/app-hDXMG) -2. ByteMD:[https://www.halo.run/store/apps/app-HTyhC](https://www.halo.run/store/apps/app-HTyhC) +Halo 支持通过插件来拓展文章编辑器,目前除了 Halo 内置的编辑器,应用市场中还有其他的编辑器可用:[https://www.halo.run/store/apps?tag=editor](https://www.halo.run/store/apps?tag=editor) ::: ## 文章设置 @@ -86,13 +83,17 @@ Halo 支持通过插件来拓展文章编辑器,目前 Halo 官方维护了另 点击分类管理页面右上角的 `新建` 按钮即可新建一个分类。 ![文章分类编辑界面说明](/img/user-guide/posts/category-create.png) +![文章分类编辑界面说明 2](/img/user-guide/posts/category-create-2.png) #### 设置说明 - **名称**:用于在主题端显示的分类名称。 - **别名**:通常用于生成分类归档页面的访问地址。默认路径规则为 `/categories/{slug}`,其中 `slug` 为分类别名,访问该地址即可浏览该分类下的所有文章。分类页路由前缀可[在设置中修改](./settings#主题路由设置)。 - **自定义模板**:自定义分类归档页面的渲染模板,由主题提供支持。 +- **自定义文章模板**:自定义当前分类下所有文章的渲染模板,由主题提供支持。 - **封面图**:分类封面图设置,需要主题支持该功能。 +- **在列表中隐藏**:开启此选项后,此分类和其下子分类,以及其下文章将不会显示在前台的列表中,需要主动访问分类归档页面,此功能仅对第一级目录生效。 +- **阻止文章级联查询**:阻止父级分类在级联文章查询中包含此分类及其子分类。 - **描述**:关于该文章分类的更多描述信息。 - **元数据**:供主题、插件使用的额外数据信息。例如部分主题期望使用不同的颜色对分类进行区分,便可以使用该功能为分类增加颜色相关的元数据。 diff --git a/docs/user-guide/settings.md b/docs/user-guide/settings.md index c04b3a1..1e16585 100644 --- a/docs/user-guide/settings.md +++ b/docs/user-guide/settings.md @@ -22,28 +22,55 @@ Halo 提供了以下站点基本信息设置: 针对主题端的文章展示,Halo 提供了以下设置项: -- **文章列表显示条数** -- **归档页文章显示条数** -- **分类页文章显示条数** -- **标签页文章显示条数** +- **文章列表显示条数**:首页的文章显示条数。 +- **归档页文章显示条数**:归档页面(\/archives)的文章显示条数。 +- **分类页文章显示条数**:分类归档页面(\/categories\/\{slug\})的文章显示条数。 +- **标签页文章显示条数**:标签归档页面(\/tags\/\{slug\})的文章显示条数。 +- **别名生成策略**: + - 根据标题:自动根据文章标题生成,比如文章标题为 `Hello Halo`,那么别名将生成为 `hello-halo` + - 时间戳:使用当前时间的时间戳作为标题 + - Short UUID:生成类似于 `BT5kIgrb` 的别名 + - UUID:生成类似于 `4f662408-ed90-470b-9ed1-7fdc0283631b` 的别名 +- **附件存储策略**:在编辑器中上传图片时的附件存储策略 +- **附件存储组**:在编辑器中上传图片时的附件分组 ## SEO 设置 针对站点的 SEO(搜索引擎优化)需求,Halo 提供了以下设置项: -- **屏蔽搜索引擎**:配置后会在所有页面 HTML 源码的 head 部分添加 ``。 -- **站点关键词**:格式为以`,`分隔的关键词列表,配置后会在所有页面 HTML 源码的 head 部分添加 ` content="{关键词}" />`。 +- **屏蔽搜索引擎**:配置后会在所有页面 HTML 源码的 head 部分添加: - :::warning 注意 - 目前主流的搜索引擎(如 Google、Bing、百度搜索等)已经不再使用该标签作为关键词的参考,因此该设置项的作用已经不大,未来我们也可能会移除该设置项。 - ::: + ```html + + ``` -- **站点描述**:配置后会在所有页面 HTML 源码的 head 部分添加 ``。 + :::info + 需要注意的是,并不是所有搜索引擎都会遵守这个规则。 + ::: + +- **站点关键词**:格式为以 `,` 分隔的关键词列表,配置后会在所有页面 HTML 源码的 head 部分添加: + + ```html + + ``` + + :::warning 注意 + 目前主流的搜索引擎(如 Google、Bing、百度搜索等)已经不再使用该标签作为关键词的参考,因此该设置项的作用已经不大,未来我们也可能会移除该设置项。 + ::: + +- **站点描述**:配置后会在所有页面 HTML 源码的 head 部分添加: + + ```html + + ``` ## 用户设置 - **开放注册**:是否允许访客注册,勾选之后在登录页面会显示注册入口。 +- **注册需验证邮箱**:开启之后,用户注册时必须要经过邮箱验证,需要配置好 [邮件通知](#通知设置)。 - **默认角色**:新注册用户的默认角色。 +- **头像存储位置**:用户上传头像的存储策略。 +- **个人中心附件存储位置**:用户在个人中心端上传附件时的默认存储策略,需要用户包含上传附件的权限。 ## 评论设置 @@ -74,13 +101,13 @@ Halo 提供了以下站点基本信息设置: - `/{year}/{month}/{slug}` - `/{year}/{month}/{day}/{slug}` - :::info 变量说明 - - `slug`:文章别名 - - `name`:文章 `metadata.name` 字段值 - - `year`:四位数格式的文章发布年份 - - `month`:两位数格式的文章发布月份 - - `day`:两位数格式的文章发布日 - ::: + :::info 变量说明 + - `slug`:文章别名 + - `name`:文章 `metadata.name` 字段值 + - `year`:四位数格式的文章发布年份 + - `month`:两位数格式的文章发布月份 + - `day`:两位数格式的文章发布日 + ::: ## 代码注入 diff --git a/docs/user-guide/user-center.md b/docs/user-guide/user-center.md index 0dd309f..14964b7 100644 --- a/docs/user-guide/user-center.md +++ b/docs/user-guide/user-center.md @@ -15,29 +15,29 @@ description: 关于个人中心的功能说明 详情可见:[创建角色](./users.md#创建角色) ::: -![Entry](/img/uc/uc-entry.png) +![Uc entry](/img/uc/uc-entry.png) ## 个人资料 这个页面会显示和用户相关的一些信息。 -![Entry](/img/uc/uc-profile.png) +![User profile](/img/uc/uc-profile.png) ## 通知配置 这个页面可以配置用户的通知偏好,可以选择接收哪些类型的通知。 -![Entry](/img/uc/uc-notification-preferences.png) +![Notification preferences](/img/uc/uc-notification-preferences.png) ## 个人令牌 -个人令牌是一种用于访问 Halo API 的凭证,可以通过个人令牌访问 Halo 的 RESTful API,而无需通过用户名和密码授权。 +个人令牌是一种用于访问 Halo API 的凭证,可以通过个人令牌访问 Halo 的 RESTful API,而无需通过用户名和密码授权,使用方式可查阅:[RESTful API 介绍](../developer-guide/restful-api/introduction.md) -![Entry](/img/uc/uc-pat.png) +![Personal access token](/img/uc/uc-pat.png) 创建新的个人令牌: -![Entry](/img/uc/uc-pat-creation.png) +![Create personal access token](/img/uc/uc-pat-creation.png) - **名称**:个人令牌的名称。 - **过期时间**:个人令牌的过期时间,不选择则表示永不过期。 @@ -46,16 +46,30 @@ description: 关于个人中心的功能说明 创建好的个人令牌: -![Entry](/img/uc/uc-pat-token.png) +![Personal access token string](/img/uc/uc-pat-token.png) + +## 两步验证 + +在这个选项卡中,我们可以配置登录之后两步验证方式,目前支持 TOTP 验证器。 + +![Totp](/img/uc/totp.png) + +![Totp Config](/img/uc/totp-config.png) + +## 登录设备 + +在这里可以看到当前账号的所有登录设备,你也可以在更多按钮中撤销任意设备。 + +![User devices](/img/uc/user-devices.png) ## 消息 此页面用于显示用户收到的站内消息。 -![Entry](/img/uc/uc-notifications.png) +![Notifications](/img/uc/uc-notifications.png) ## 我的文章 Halo 默认为个人中心提供了管理个人文章的功能,每个用户都可以在个人中心创建、编辑自己的文章。当然,也可以通过配置角色权限,自行决定是否开放此功能,可查阅[创建角色](./users.md#创建角色)。 -![Entry](/img/uc/uc-posts.png) +![My posts](/img/uc/uc-posts.png) diff --git a/docs/user-guide/users.md b/docs/user-guide/users.md index 3ce5545..e912842 100644 --- a/docs/user-guide/users.md +++ b/docs/user-guide/users.md @@ -15,18 +15,16 @@ Halo 2.0 版本采用了基于角色的权限控制(RBAC)体系。不同于 在用户管理页面,点击右上角的 `添加用户` 按钮即可弹出新建用户对话框。 -![创建用户](/img/user-guide/users/user-setting.png) +![创建用户](/img/user-guide/users/user-setting-2.20+.png) 目前支持配置的用户属性有: - **用户名**:用户登录 Halo 控制台使用的用户名,不可与已有的用户名重复; - **显示名称**:用于显示文章作者等用户信息时使用的,更友好的用户名称; -- **密码** -- **电子邮箱** -- **手机号** -- **头像** -- **描述** -- **元数据**:供主题、插件使用的额外数据信息。例如部分主题期望展示作者的学历、工作单位等信息,便可以使用该功能为用户增加相关的元数据。 +- **电子邮箱**:用户的电子邮箱; +- **新密码**:用户的初始密码; +- **角色**:用户的初始角色; +- **描述**:可以用于为用户添加备注。 ### 其他操作 @@ -81,7 +79,6 @@ Halo 提供了全新创建和基于已有角色创建两种角色创建方式。 ![创建角色](/img/user-guide/users/role-creation.png) - **名称**:角色的名称。 -- **登录之后默认跳转位置**:用户登录成功后,跳转到指定的页面。 - **禁止访问 Console**:勾选后,该角色的用户将无法进入 Console 管理控制台,只能访问个人中心(/uc)。 - **权限**:角色的权限,可以选择多个权限。 @@ -113,6 +110,6 @@ Halo 提供了全新创建和基于已有角色创建两种角色创建方式。 进入身份认证管理页面之后,如果你已经安装了提供身份认证方式的插件,你就可以在列表中看到对应的身份认证方式,你可以对其进行设置并启用。 -![身份认证方式](/img/user-guide/users/auth-providers.png) +![身份认证方式](/img/user-guide/users/auth-providers-2.20+.png) > 这里是安装了 [OAuth2 认证](https://www.halo.run/store/apps/app-ESVDK) 插件,提供了 `GitHub`、`GitLab`、`Gitee` 三种 OAuth2 认证方式。 diff --git a/static/img/install/1panel/app-store-halo.png b/static/img/install/1panel/app-store-halo.png index f44dcb9..d54f14e 100644 Binary files a/static/img/install/1panel/app-store-halo.png and b/static/img/install/1panel/app-store-halo.png differ diff --git a/static/img/install/1panel/halo-status.png b/static/img/install/1panel/halo-status.png index e132aeb..377cbce 100644 Binary files a/static/img/install/1panel/halo-status.png and b/static/img/install/1panel/halo-status.png differ diff --git a/static/img/install/1panel/install-halo.png b/static/img/install/1panel/install-halo.png index 5cff887..0959f4b 100644 Binary files a/static/img/install/1panel/install-halo.png and b/static/img/install/1panel/install-halo.png differ diff --git a/static/img/install/1panel/new-site.png b/static/img/install/1panel/new-site.png index b0ee13a..c1f5bb0 100644 Binary files a/static/img/install/1panel/new-site.png and b/static/img/install/1panel/new-site.png differ diff --git a/static/img/install/1panel/openresty-mysql.png b/static/img/install/1panel/openresty-mysql.png index 32acedf..611c849 100644 Binary files a/static/img/install/1panel/openresty-mysql.png and b/static/img/install/1panel/openresty-mysql.png differ diff --git a/static/img/install/1panel/site.png b/static/img/install/1panel/site.png index e3fcad7..2f50f69 100644 Binary files a/static/img/install/1panel/site.png and b/static/img/install/1panel/site.png differ diff --git a/static/img/migrate/halo1.6-export.png b/static/img/migrate/halo1.6-export.png new file mode 100644 index 0000000..2cf18c4 Binary files /dev/null and b/static/img/migrate/halo1.6-export.png differ diff --git a/static/img/migrate/halo2.0-migrate-plugin-1.png b/static/img/migrate/halo2.0-migrate-plugin-1.png new file mode 100644 index 0000000..c23bbe9 Binary files /dev/null and b/static/img/migrate/halo2.0-migrate-plugin-1.png differ diff --git a/static/img/migrate/halo2.0-migrate-plugin-2.png b/static/img/migrate/halo2.0-migrate-plugin-2.png new file mode 100644 index 0000000..1bc0858 Binary files /dev/null and b/static/img/migrate/halo2.0-migrate-plugin-2.png differ diff --git a/static/img/migrate/halo2.0-migrate-plugin-3.png b/static/img/migrate/halo2.0-migrate-plugin-3.png new file mode 100644 index 0000000..5a00e1f Binary files /dev/null and b/static/img/migrate/halo2.0-migrate-plugin-3.png differ diff --git a/static/img/migrate/halo2.0-migrate-plugin.png b/static/img/migrate/halo2.0-migrate-plugin.png index 416fc0b..c23bbe9 100644 Binary files a/static/img/migrate/halo2.0-migrate-plugin.png and b/static/img/migrate/halo2.0-migrate-plugin.png differ diff --git a/static/img/uc/totp-config.png b/static/img/uc/totp-config.png new file mode 100644 index 0000000..b8c514f Binary files /dev/null and b/static/img/uc/totp-config.png differ diff --git a/static/img/uc/totp.png b/static/img/uc/totp.png new file mode 100644 index 0000000..2bd0535 Binary files /dev/null and b/static/img/uc/totp.png differ diff --git a/static/img/uc/uc-entry.png b/static/img/uc/uc-entry.png index d300a1c..613bd00 100644 Binary files a/static/img/uc/uc-entry.png and b/static/img/uc/uc-entry.png differ diff --git a/static/img/uc/uc-notification-preferences.png b/static/img/uc/uc-notification-preferences.png index f0ac5f7..9fafc8a 100644 Binary files a/static/img/uc/uc-notification-preferences.png and b/static/img/uc/uc-notification-preferences.png differ diff --git a/static/img/uc/uc-notifications.png b/static/img/uc/uc-notifications.png index c4fdbf1..7d1d144 100644 Binary files a/static/img/uc/uc-notifications.png and b/static/img/uc/uc-notifications.png differ diff --git a/static/img/uc/uc-pat-creation.png b/static/img/uc/uc-pat-creation.png index b6d4380..83c702c 100644 Binary files a/static/img/uc/uc-pat-creation.png and b/static/img/uc/uc-pat-creation.png differ diff --git a/static/img/uc/uc-pat-token.png b/static/img/uc/uc-pat-token.png index 458d477..1b79140 100644 Binary files a/static/img/uc/uc-pat-token.png and b/static/img/uc/uc-pat-token.png differ diff --git a/static/img/uc/uc-pat.png b/static/img/uc/uc-pat.png index abe31f6..15d1247 100644 Binary files a/static/img/uc/uc-pat.png and b/static/img/uc/uc-pat.png differ diff --git a/static/img/uc/uc-posts.png b/static/img/uc/uc-posts.png index 2de08ca..5408fe9 100644 Binary files a/static/img/uc/uc-posts.png and b/static/img/uc/uc-posts.png differ diff --git a/static/img/uc/uc-profile.png b/static/img/uc/uc-profile.png index 882fd62..0f1607a 100644 Binary files a/static/img/uc/uc-profile.png and b/static/img/uc/uc-profile.png differ diff --git a/static/img/uc/user-devices.png b/static/img/uc/user-devices.png new file mode 100644 index 0000000..aa2b8f2 Binary files /dev/null and b/static/img/uc/user-devices.png differ diff --git a/static/img/user-guide/app-store/app-store-license-generate-license-1.png b/static/img/user-guide/app-store/app-store-license-generate-license-1.png index f579a50..b9eef21 100644 Binary files a/static/img/user-guide/app-store/app-store-license-generate-license-1.png and b/static/img/user-guide/app-store/app-store-license-generate-license-1.png differ diff --git a/static/img/user-guide/app-store/app-store-license-generate-license-2.png b/static/img/user-guide/app-store/app-store-license-generate-license-2.png index 0290cfc..55092d2 100644 Binary files a/static/img/user-guide/app-store/app-store-license-generate-license-2.png and b/static/img/user-guide/app-store/app-store-license-generate-license-2.png differ diff --git a/static/img/user-guide/app-store/app-store-license-generate-license-3.png b/static/img/user-guide/app-store/app-store-license-generate-license-3.png index 3553d23..e9c5c9f 100644 Binary files a/static/img/user-guide/app-store/app-store-license-generate-license-3.png and b/static/img/user-guide/app-store/app-store-license-generate-license-3.png differ diff --git a/static/img/user-guide/app-store/app-store-license-manage.png b/static/img/user-guide/app-store/app-store-license-manage.png index 9bb246b..d6b38fd 100644 Binary files a/static/img/user-guide/app-store/app-store-license-manage.png and b/static/img/user-guide/app-store/app-store-license-manage.png differ diff --git a/static/img/user-guide/app-store/app-store-license-offline-option.png b/static/img/user-guide/app-store/app-store-license-offline-option.png index 7f9fc5f..1092e94 100644 Binary files a/static/img/user-guide/app-store/app-store-license-offline-option.png and b/static/img/user-guide/app-store/app-store-license-offline-option.png differ diff --git a/static/img/user-guide/app-store/app-store-license-offline.png b/static/img/user-guide/app-store/app-store-license-offline.png index be0fa4b..3034b28 100644 Binary files a/static/img/user-guide/app-store/app-store-license-offline.png and b/static/img/user-guide/app-store/app-store-license-offline.png differ diff --git a/static/img/user-guide/app-store/app-store-license-status.png b/static/img/user-guide/app-store/app-store-license-status.png index fe8fa0f..ede5984 100644 Binary files a/static/img/user-guide/app-store/app-store-license-status.png and b/static/img/user-guide/app-store/app-store-license-status.png differ diff --git a/static/img/user-guide/app-store/app-store-page.png b/static/img/user-guide/app-store/app-store-page.png index 7ca2787..e891b53 100644 Binary files a/static/img/user-guide/app-store/app-store-page.png and b/static/img/user-guide/app-store/app-store-page.png differ diff --git a/static/img/user-guide/app-store/app-store-pat.png b/static/img/user-guide/app-store/app-store-pat.png index 99b0f52..f3537b2 100644 Binary files a/static/img/user-guide/app-store/app-store-pat.png and b/static/img/user-guide/app-store/app-store-pat.png differ diff --git a/static/img/user-guide/app-store/app-store-plugin-license.png b/static/img/user-guide/app-store/app-store-plugin-license.png index 4000ceb..6176a57 100644 Binary files a/static/img/user-guide/app-store/app-store-plugin-license.png and b/static/img/user-guide/app-store/app-store-plugin-license.png differ diff --git a/static/img/user-guide/app-store/app-store-plugins.png b/static/img/user-guide/app-store/app-store-plugins.png index 479d77f..fb61452 100644 Binary files a/static/img/user-guide/app-store/app-store-plugins.png and b/static/img/user-guide/app-store/app-store-plugins.png differ diff --git a/static/img/user-guide/app-store/app-store-themes.png b/static/img/user-guide/app-store/app-store-themes.png index bccc77b..d3c9153 100644 Binary files a/static/img/user-guide/app-store/app-store-themes.png and b/static/img/user-guide/app-store/app-store-themes.png differ diff --git a/static/img/user-guide/app-store/app-store-upgrade-plugin.png b/static/img/user-guide/app-store/app-store-upgrade-plugin.png index b2d1a5b..4d45d09 100644 Binary files a/static/img/user-guide/app-store/app-store-upgrade-plugin.png and b/static/img/user-guide/app-store/app-store-upgrade-plugin.png differ diff --git a/static/img/user-guide/app-store/app-store-upgrade-theme.png b/static/img/user-guide/app-store/app-store-upgrade-theme.png index 05db8a5..3a7e648 100644 Binary files a/static/img/user-guide/app-store/app-store-upgrade-theme.png and b/static/img/user-guide/app-store/app-store-upgrade-theme.png differ diff --git a/static/img/user-guide/attachments/attachment-batch-operate.png b/static/img/user-guide/attachments/attachment-batch-operate.png index ef509f6..00c69d7 100644 Binary files a/static/img/user-guide/attachments/attachment-batch-operate.png and b/static/img/user-guide/attachments/attachment-batch-operate.png differ diff --git a/static/img/user-guide/attachments/attachment-detail.png b/static/img/user-guide/attachments/attachment-detail.png index 86c6641..75a3182 100644 Binary files a/static/img/user-guide/attachments/attachment-detail.png and b/static/img/user-guide/attachments/attachment-detail.png differ diff --git a/static/img/user-guide/attachments/attachment-group-add.png b/static/img/user-guide/attachments/attachment-group-add.png index 925fd72..a1542ab 100644 Binary files a/static/img/user-guide/attachments/attachment-group-add.png and b/static/img/user-guide/attachments/attachment-group-add.png differ diff --git a/static/img/user-guide/attachments/attachment-group-delete.png b/static/img/user-guide/attachments/attachment-group-delete.png index 96d9506..d856a78 100644 Binary files a/static/img/user-guide/attachments/attachment-group-delete.png and b/static/img/user-guide/attachments/attachment-group-delete.png differ diff --git a/static/img/user-guide/attachments/attachment-move.png b/static/img/user-guide/attachments/attachment-move.png index 20003f4..af77413 100644 Binary files a/static/img/user-guide/attachments/attachment-move.png and b/static/img/user-guide/attachments/attachment-move.png differ diff --git a/static/img/user-guide/attachments/attachment-policy-add-local.png b/static/img/user-guide/attachments/attachment-policy-add-local.png index 9295008..ebb6be5 100644 Binary files a/static/img/user-guide/attachments/attachment-policy-add-local.png and b/static/img/user-guide/attachments/attachment-policy-add-local.png differ diff --git a/static/img/user-guide/attachments/attachment-policy-add.png b/static/img/user-guide/attachments/attachment-policy-add.png index aea264a..2a90643 100644 Binary files a/static/img/user-guide/attachments/attachment-policy-add.png and b/static/img/user-guide/attachments/attachment-policy-add.png differ diff --git a/static/img/user-guide/attachments/attachment-policy-operate.png b/static/img/user-guide/attachments/attachment-policy-operate.png index 40a8e43..fe3fa94 100644 Binary files a/static/img/user-guide/attachments/attachment-policy-operate.png and b/static/img/user-guide/attachments/attachment-policy-operate.png differ diff --git a/static/img/user-guide/attachments/attachment-upload.png b/static/img/user-guide/attachments/attachment-upload.png index 765e919..60953f2 100644 Binary files a/static/img/user-guide/attachments/attachment-upload.png and b/static/img/user-guide/attachments/attachment-upload.png differ diff --git a/static/img/user-guide/backup/backup-complete.png b/static/img/user-guide/backup/backup-complete.png index 9eb34e5..cf027e8 100644 Binary files a/static/img/user-guide/backup/backup-complete.png and b/static/img/user-guide/backup/backup-complete.png differ diff --git a/static/img/user-guide/backup/backup-running.png b/static/img/user-guide/backup/backup-running.png index 9447b0d..496f5bb 100644 Binary files a/static/img/user-guide/backup/backup-running.png and b/static/img/user-guide/backup/backup-running.png differ diff --git a/static/img/user-guide/backup/before-restore.png b/static/img/user-guide/backup/before-restore.png index 21d0729..ed7738e 100644 Binary files a/static/img/user-guide/backup/before-restore.png and b/static/img/user-guide/backup/before-restore.png differ diff --git a/static/img/user-guide/backup/create-backup.png b/static/img/user-guide/backup/create-backup.png index 8eb36ea..b736024 100644 Binary files a/static/img/user-guide/backup/create-backup.png and b/static/img/user-guide/backup/create-backup.png differ diff --git a/static/img/user-guide/backup/restore-complete.png b/static/img/user-guide/backup/restore-complete.png index ad78969..2e2bbae 100644 Binary files a/static/img/user-guide/backup/restore-complete.png and b/static/img/user-guide/backup/restore-complete.png differ diff --git a/static/img/user-guide/backup/restore-upload.png b/static/img/user-guide/backup/restore-upload.png index a8fc28f..7ed17c8 100644 Binary files a/static/img/user-guide/backup/restore-upload.png and b/static/img/user-guide/backup/restore-upload.png differ diff --git a/static/img/user-guide/backup/restore.png b/static/img/user-guide/backup/restore.png index 448f956..2e78ff7 100644 Binary files a/static/img/user-guide/backup/restore.png and b/static/img/user-guide/backup/restore.png differ diff --git a/static/img/user-guide/backup/waiting-restart.png b/static/img/user-guide/backup/waiting-restart.png index 07bca40..1b2a394 100644 Binary files a/static/img/user-guide/backup/waiting-restart.png and b/static/img/user-guide/backup/waiting-restart.png differ diff --git a/static/img/user-guide/common/login.png b/static/img/user-guide/common/login.png new file mode 100644 index 0000000..35fc90c Binary files /dev/null and b/static/img/user-guide/common/login.png differ diff --git a/static/img/user-guide/common/signup.png b/static/img/user-guide/common/signup.png new file mode 100644 index 0000000..1ed3dd9 Binary files /dev/null and b/static/img/user-guide/common/signup.png differ diff --git a/static/img/user-guide/common/控制台界面说明.png b/static/img/user-guide/common/控制台界面说明.png index a785455..5395e08 100644 Binary files a/static/img/user-guide/common/控制台界面说明.png and b/static/img/user-guide/common/控制台界面说明.png differ diff --git a/static/img/user-guide/pages/page-about.png b/static/img/user-guide/pages/page-about.png index 74f6d4f..3772b55 100644 Binary files a/static/img/user-guide/pages/page-about.png and b/static/img/user-guide/pages/page-about.png differ diff --git a/static/img/user-guide/pages/page-links-edit.png b/static/img/user-guide/pages/page-links-edit.png deleted file mode 100644 index 4811698..0000000 Binary files a/static/img/user-guide/pages/page-links-edit.png and /dev/null differ diff --git a/static/img/user-guide/pages/page-links.png b/static/img/user-guide/pages/page-links.png deleted file mode 100644 index 115a8bf..0000000 Binary files a/static/img/user-guide/pages/page-links.png and /dev/null differ diff --git a/static/img/user-guide/plugins/plugin-install.png b/static/img/user-guide/plugins/plugin-install.png index baaa67a..68a0403 100644 Binary files a/static/img/user-guide/plugins/plugin-install.png and b/static/img/user-guide/plugins/plugin-install.png differ diff --git a/static/img/user-guide/plugins/plugin-setting.png b/static/img/user-guide/plugins/plugin-setting.png index 098ef7c..7f03176 100644 Binary files a/static/img/user-guide/plugins/plugin-setting.png and b/static/img/user-guide/plugins/plugin-setting.png differ diff --git a/static/img/user-guide/plugins/plugin-switch.png b/static/img/user-guide/plugins/plugin-switch.png index 1829f30..da0cc06 100644 Binary files a/static/img/user-guide/plugins/plugin-switch.png and b/static/img/user-guide/plugins/plugin-switch.png differ diff --git a/static/img/user-guide/plugins/plugin-uninstall.png b/static/img/user-guide/plugins/plugin-uninstall.png index af9b4aa..bdc094c 100644 Binary files a/static/img/user-guide/plugins/plugin-uninstall.png and b/static/img/user-guide/plugins/plugin-uninstall.png differ diff --git a/static/img/user-guide/posts/category-create-2.png b/static/img/user-guide/posts/category-create-2.png new file mode 100644 index 0000000..9251551 Binary files /dev/null and b/static/img/user-guide/posts/category-create-2.png differ diff --git a/static/img/user-guide/posts/category-create.png b/static/img/user-guide/posts/category-create.png index a01d0a6..cef6c6e 100644 Binary files a/static/img/user-guide/posts/category-create.png and b/static/img/user-guide/posts/category-create.png differ diff --git a/static/img/user-guide/posts/post-edit.png b/static/img/user-guide/posts/post-edit.png index f31fdd9..0877feb 100644 Binary files a/static/img/user-guide/posts/post-edit.png and b/static/img/user-guide/posts/post-edit.png differ diff --git a/static/img/user-guide/posts/post-setting.png b/static/img/user-guide/posts/post-setting.png index 06d5e89..a534e85 100644 Binary files a/static/img/user-guide/posts/post-setting.png and b/static/img/user-guide/posts/post-setting.png differ diff --git a/static/img/user-guide/posts/tag-create.png b/static/img/user-guide/posts/tag-create.png index ffd5bbf..1c00460 100644 Binary files a/static/img/user-guide/posts/tag-create.png and b/static/img/user-guide/posts/tag-create.png differ diff --git a/static/img/user-guide/themes/theme-install.png b/static/img/user-guide/themes/theme-install.png index 2c649ee..3d659c4 100644 Binary files a/static/img/user-guide/themes/theme-install.png and b/static/img/user-guide/themes/theme-install.png differ diff --git a/static/img/user-guide/themes/theme-setting.png b/static/img/user-guide/themes/theme-setting.png index 0032567..5a9507e 100644 Binary files a/static/img/user-guide/themes/theme-setting.png and b/static/img/user-guide/themes/theme-setting.png differ diff --git a/static/img/user-guide/themes/theme-uninstall.png b/static/img/user-guide/themes/theme-uninstall.png index b7f6c49..8b28530 100644 Binary files a/static/img/user-guide/themes/theme-uninstall.png and b/static/img/user-guide/themes/theme-uninstall.png differ diff --git a/static/img/user-guide/users/auth-providers-2.20+.png b/static/img/user-guide/users/auth-providers-2.20+.png new file mode 100644 index 0000000..9bae124 Binary files /dev/null and b/static/img/user-guide/users/auth-providers-2.20+.png differ diff --git a/static/img/user-guide/users/auth-providers-entry.png b/static/img/user-guide/users/auth-providers-entry.png index 429128a..d93c1b9 100644 Binary files a/static/img/user-guide/users/auth-providers-entry.png and b/static/img/user-guide/users/auth-providers-entry.png differ diff --git a/static/img/user-guide/users/role-creation.png b/static/img/user-guide/users/role-creation.png index ac36d74..3edb7f6 100644 Binary files a/static/img/user-guide/users/role-creation.png and b/static/img/user-guide/users/role-creation.png differ diff --git a/static/img/user-guide/users/role-fork.png b/static/img/user-guide/users/role-fork.png index cadd621..5697a72 100644 Binary files a/static/img/user-guide/users/role-fork.png and b/static/img/user-guide/users/role-fork.png differ diff --git a/static/img/user-guide/users/role-management.png b/static/img/user-guide/users/role-management.png index 5040520..639c591 100644 Binary files a/static/img/user-guide/users/role-management.png and b/static/img/user-guide/users/role-management.png differ diff --git a/static/img/user-guide/users/user-operate.png b/static/img/user-guide/users/user-operate.png index 41eb17c..7ec9786 100644 Binary files a/static/img/user-guide/users/user-operate.png and b/static/img/user-guide/users/user-operate.png differ diff --git a/static/img/user-guide/users/user-setting-2.20+.png b/static/img/user-guide/users/user-setting-2.20+.png new file mode 100644 index 0000000..0bb3a62 Binary files /dev/null and b/static/img/user-guide/users/user-setting-2.20+.png differ diff --git a/versioned_docs/version-2.20/getting-started/install/1panel.md b/versioned_docs/version-2.20/getting-started/install/1panel.md index 5d29d80..a264f57 100644 --- a/versioned_docs/version-2.20/getting-started/install/1panel.md +++ b/versioned_docs/version-2.20/getting-started/install/1panel.md @@ -28,7 +28,7 @@ import DockerArgs from "./slots/_docker-args.md" ### 安装基础软件 -在安装 Halo 之前,我们需要先在 1Panel 上安装好所需的软件,包括 OpenResty 和 MySQL。在接下来的文档中,我们会默认你已经安装好了这两个软件,并不再赘述。 +在安装 Halo 之前,我们需要先在 1Panel 上安装好所需的软件,包括 OpenResty 和数据库(MySQL、PostgreSQL、MariaDB 都可以)。在接下来的文档中,我们会默认你已经安装好了这两个软件,并不再赘述。 ![OpenResty 和 MySQL](/img/install/1panel/openresty-mysql.png) @@ -45,12 +45,11 @@ import DockerArgs from "./slots/_docker-args.md" 参数说明: - **名称**:要创建的 Halo 应用的名称。 +- **版本**:选择最新的版本即可。 - **数据库服务**:Halo 应用使用的数据库应用,支持下拉选择已安装的数据库应用,1Panel 会自动配置 Halo 使用该数据库。 - **数据库名**:Halo 应用使用的数据库名称,1Panel 会在选中的数据库中自动创建这个数据库。 - **数据库用户**:Halo 应用使用的数据库用户名,1Panel 会在选中的数据库中自动创建这个用户,并添加对应的数据库授权。 - **数据库用户密码**:Halo 应用使用的数据库用户密码,1Panel 会在选中的数据库中自动为上一步创建的用户配置该密码。 -- **超级管理员用户名**:Halo 应用初始化创建的超级管理员用户名。 -- **超级管理员密码**:Halo 应用初始化创建的超级管理员密码。 - **外部访问地址**:Halo 应用的最终访问地址,如果有为 Halo 规划域名,需要配置为域名格式,例如 `http://halo.example.com`。否则配置为 `http://服务器IP:PORT`,例如 `http://192.168.1.1:8090`。 - **端口**:Halo 应用的服务端口。 @@ -58,10 +57,6 @@ import DockerArgs from "./slots/_docker-args.md" ![Halo 运行状态](/img/install/1panel/halo-status.png) -此时便可以通过配置的外部访问地址来访问 Halo 了。 - -![访问 Halo](/img/install/1panel/halo-console.png) - ## 创建网站 完成 Halo 应用的安装后,此时并不会自动创建一个网站,我们需要手动创建一个网站,然后将 Halo 应用绑定到这个网站上才能使用域名访问。 @@ -73,6 +68,6 @@ import DockerArgs from "./slots/_docker-args.md" 1. 在已装应用中选择我们刚刚新建的 Halo 应用。 2. 正确填写主域名,需要注意的是需要提前解析好域名到服务器 IP。 -最后,点击确认按钮,等待网站创建完成。 +最后,点击确认按钮,等待网站创建完成即可访问网站进行 [初始化](../setup.md)。 ![网站列表](/img/install/1panel/site.png) diff --git a/versioned_docs/version-2.20/getting-started/migrate-from-1.x.md b/versioned_docs/version-2.20/getting-started/migrate-from-1.x.md index dec94e6..bf73918 100644 --- a/versioned_docs/version-2.20/getting-started/migrate-from-1.x.md +++ b/versioned_docs/version-2.20/getting-started/migrate-from-1.x.md @@ -7,19 +7,15 @@ description: 从 Halo 1.x 迁移的完整指南和注意事项 - Halo 版本必须为 1.5.x 或 1.6.x。如果不满足,需要先升级到 1.5.x 或 1.6.x 版本。 - Halo 2.0 不兼容 1.x 的主题,建议在升级前先查询你正在使用的主题是否已经支持 2.0。你可以访问 [halo-sigs/awesome-halo](https://github.com/halo-sigs/awesome-halo) 或 [应用市场](https://www.halo.run/store/apps?type=THEME) 查阅目前支持的主题。 -- Halo 2.0 目前没有内置 Markdown 编辑器,如果需要重新编辑迁移后的文章,需要额外安装 Markdown 编辑器插件。目前社区已经提供了以下插件: - - StackEdit:[https://www.halo.run/store/apps/app-hDXMG](https://www.halo.run/store/apps/app-hDXMG) - - ByteMD:[https://www.halo.run/store/apps/app-HTyhC](https://www.halo.run/store/apps/app-HTyhC) +- Halo 2.0 目前没有内置 Markdown 编辑器,如果需要重新编辑迁移后的文章,需要额外安装 Markdown 编辑器插件,可以在应用市场找到合适的 Markdown 插件:[https://www.halo.run/store/apps?tag=editor](https://www.halo.run/store/apps?tag=editor) - Halo 2.0 不再内置友情链接、日志、图库等模块,需要安装额外的插件,目前官方已提供: - 链接管理:[https://www.halo.run/store/apps/app-hfbQg](https://www.halo.run/store/apps/app-hfbQg) - 图库:[https://www.halo.run/store/apps/app-BmQJW](https://www.halo.run/store/apps/app-BmQJW) - 瞬间(原日志):[https://www.halo.run/store/apps/app-SnwWD](https://www.halo.run/store/apps/app-SnwWD) - Halo 2.0 不再内置外部云存储的支持。需要安装额外的插件,目前官方已提供: - S3(兼容国内主流的云存储):[https://www.halo.run/store/apps/app-Qxhpp](https://www.halo.run/store/apps/app-Qxhpp) - - 阿里云 OSS:[https://www.halo.run/store/apps/app-wCJCD](https://www.halo.run/store/apps/app-wCJCD) - 在迁移过程中不会保留旧版本的用户数据,迁移完成之后,关于文章等数据的关联都将改为 Halo 2.0 的新用户。 - 为了防止直接升级 2.0 导致 1.x 的数据受到破坏,我们已经将工作目录由 `~/.halo` 变更为 `~/.halo2`。 -- 目前 Halo 2.0 仅提供 Docker 部署方式,没有提供可执行 JAR 包,但可以自编译,请参考 [构建](../developer-guide/core/build.md) 文档 - 可以考虑先在本地运行一个 Halo 2.0,模拟一下导入,检查导入后是否满足要求。 如果遇到了迁移过程中的问题,也可以向我们提交 Issue: [https://github.com/halo-dev/halo/issues/new/choose](https://github.com/halo-dev/halo/issues/new/choose),以上暂不支持的功能我们也会陆续完善。 @@ -32,7 +28,7 @@ description: 从 Halo 1.x 迁移的完整指南和注意事项 在 Halo 1.5.x / 1.6.x 后台的小工具中提供了数据导出的功能,将最新的数据进行备份,然后下载即可。这个数据文件包含了数据库所有的数据,后续我们在 2.0 的导入插件中就是通过这个文件进行数据导入。 -![halo-data-export.png](/img/halo-data-export.png) +![Halo 1.6 export data](/img/migrate/halo1.6-export.png) ## 部署 Halo 2.0 @@ -40,6 +36,7 @@ description: 从 Halo 1.x 迁移的完整指南和注意事项 - [使用 Docker 部署](./install/docker.md) - [使用 Docker Compose 部署](./install/docker-compose.md) +- [使用 JAR 文件部署](./install/jar-file.md) :::tip 可以考虑暂时保留旧版本的 Halo,等到迁移完成之后再移除。如果需要保留旧版本的 Halo,请注意在部署 Halo 2.0 的时候使用其他端口,然后在反向代理(Nginx)中修改为 Halo 2.0 的运行端口即可。 @@ -67,14 +64,19 @@ description: 从 Halo 1.x 迁移的完整指南和注意事项 1. 安装 S3 插件。 2. 进入附件管理页面。 3. 点击页面右上角的 **存储策略** 按钮。 -4. 创建存储策略,选择 **S3 Object Storage**。 +4. 创建存储策略,选择 **S3 对象存储**。 5. 填写相关配置,点击 **保存** 即可。 ## 迁移 -![Migrate Plugin](/img/migrate/halo2.0-migrate-plugin.png) +![Migrate Plugin 1](/img/migrate/halo2.0-migrate-plugin-1.png) + +![Migrate Plugin 2](/img/migrate/halo2.0-migrate-plugin-2.png) + +![Migrate Plugin 3](/img/migrate/halo2.0-migrate-plugin-3.png) 1. 点击左侧菜单的迁移进入迁移页面。 -2. 点击 **选择文件** 按钮,选择在 Halo 1.5.x / 1.6.x 导出的数据文件(JSON 格式)。 -3. 如果在 1.x 中使用了云存储,会弹出选择云存储的对话框,选择之前创建的存储策略即可。 -4. 最后点击页面下方的 **执行导入** 即可。 +2. 选择 **Halo 1.5 / 1.6 数据迁移**。 +3. 点击 **选择文件** 按钮,选择在 Halo 1.5.x / 1.6.x 导出的数据文件(JSON 格式)。 +4. 如果在 1.x 中使用了云存储,会弹出选择云存储的对话框,选择之前创建的存储策略即可。 +5. 最后点击页面下方的 **执行导入** 即可。 diff --git a/versioned_docs/version-2.20/user-guide/attachments.md b/versioned_docs/version-2.20/user-guide/attachments.md index f45fead..36e632b 100644 --- a/versioned_docs/version-2.20/user-guide/attachments.md +++ b/versioned_docs/version-2.20/user-guide/attachments.md @@ -10,10 +10,9 @@ description: 附件管理相关功能说明 Halo 默认提供了本地的存储策略类型,你还可以通过安装插件的方式扩展其他的存储策略类型。一个存储策略包含了存储提供者,具体存储位置等使用该类型存储所必要的各种信息。 :::info -目前 Halo 官方维护了两个存储策略插件,可以根据需要选择安装: +目前除了 Halo 内置的本地存储,在应用市场中也有三方的存储插件:[https://www.halo.run/store/apps?tag=storage](https://www.halo.run/store/apps?tag=storage) -1. 阿里云 OSS:[https://www.halo.run/store/apps/app-wCJCD](https://www.halo.run/store/apps/app-wCJCD) -2. Amazon S3 协议(主流云存储厂商均支持):[https://www.halo.run/store/apps/app-Qxhpp](https://www.halo.run/store/apps/app-Qxhpp) +此外,如果你期望对接类似于阿里云、腾讯云的对象存储,可以考虑使用 [对象存储(Amazon S3 协议)](https://www.halo.run/store/apps/app-Qxhpp) 插件,此插件兼容市面上所有支持 S3 协议的对象存储厂商。 ::: 你可以点击附件页面右上角的 `存储策略` 按钮对存储策略进行管理。 @@ -24,7 +23,7 @@ Halo 默认提供了本地的存储策略类型,你还可以通过安装插件 ![添加存储策略](/img/user-guide/attachments/attachment-policy-add.png) -添加时首先需要选择一种存储策略类型,系统内置的存储策略为本地存储,图中的 `S3 Object Storage` 由[对象存储(Amazon S3 协议)](https://www.halo.run/store/apps/app-Qxhpp)提供,此文档以本地存储为例。 +添加时首先需要选择一种存储策略类型,系统内置的存储策略为本地存储,图中的 `S3 对象存储` 由[对象存储(Amazon S3 协议)](https://www.halo.run/store/apps/app-Qxhpp)提供,此文档以本地存储为例。 ![添加本地存储策略](/img/user-guide/attachments/attachment-policy-add-local.png) @@ -74,8 +73,8 @@ Halo 目前提供了两种分组删除策略: ![上传附件](/img/user-guide/attachments/attachment-upload.png) -1. **分组选择**:你可以选择需要上传到的分组,为了方便,选择之后会在浏览器记住这个选项。 -2. **存储策略选择**:你可以选择需要使用的存储策略,为了方便,选择之后会在浏览器记住这个选项。 +1. **存储策略选择**:你可以选择需要使用的存储策略,为了方便,选择之后会在浏览器记住这个选项。 +2. **分组选择**:你可以选择需要上传到的分组,为了方便,选择之后会在浏览器记住这个选项。 3. **上传区域**:同时支持拖拽文件、点击上传区域选择文件、粘贴文件。 ## 查看附件 diff --git a/versioned_docs/version-2.20/user-guide/common.md b/versioned_docs/version-2.20/user-guide/common.md index 44c249a..95a02b0 100644 --- a/versioned_docs/version-2.20/user-guide/common.md +++ b/versioned_docs/version-2.20/user-guide/common.md @@ -6,15 +6,21 @@ Halo 作为一款好用又强大的开源建站工具,配合上不同的模板 为了更好地发挥出 Halo 的价值,这里有一些基本概念需要你进行了解。 +## 登录 + +Halo 的统一登录入口为 `/login`。 + +![Login](/img/user-guide/common/login.png) + +## 注册 + +Halo 的注册地址为 `/signup`,需要注意的是,Halo 默认不会开启注册功能,需要在设置页面的 [用户设置](./settings.md#用户设置) 中手动开启。 + +![Signup](/img/user-guide/common/signup.png) + ## 控制台 -控制台是一个 Halo 站点的后台管理系统,只有具有权限的登录用户才可以正常使用控制台功能。你可以在控制台中管理站点中的文章、页面、附件等各种内容,调整站点使用的主题或各种设置。 - -:::info -控制台的访问入口为 `/console`。忘记密码请参考[常见问题中的忘记密码章节](../user-guide/faq.md#忘记密码怎么办)进行处理。 -::: - -### 界面说明 +Console 控制台是一个 Halo 站点的后台管理系统,只有具有权限的登录用户才可以正常使用控制台功能。你可以在控制台中管理站点中的文章、页面、附件等各种内容,调整站点使用的主题或各种设置,访问地址为 `/console`。 ![控制台界面说明](/img/user-guide/common/控制台界面说明.png) diff --git a/versioned_docs/version-2.20/user-guide/faq.md b/versioned_docs/version-2.20/user-guide/faq.md index f738757..3fbe14f 100644 --- a/versioned_docs/version-2.20/user-guide/faq.md +++ b/versioned_docs/version-2.20/user-guide/faq.md @@ -7,50 +7,55 @@ description: 使用上的常见问题 **Halo** [ˈheɪloʊ],是一款好用又强大的[开源建站工具](https://github.com/halo-dev/halo),配合上不同的模板与插件,可以很好地帮助你构建你心中的理想站点。它可以是你公司的官方网站,可以是你的个人博客,也可以是团队共享的知识库,甚至可以是一个论坛、一个商城。 +### 为什么 Halo 启动之后,数据库只有一张表? + +从 Halo 2.0 开始,为了方便插件扩展,能够方便的持久化数据,我们设计了一种自定义模型的方案,详情可参考 RFC:[自定义模型设计 +](https://github.com/halo-dev/rfcs/tree/main/extension) + ### 忘记密码怎么办? -1. 站点管理员已经配置好邮件通知,并且用户已完成电子邮箱验证时,可以点击登录页面的 `找回密码` 选项或直接访问 `/console/reset-password` 地址,填写用户名及对应邮箱后,系统将向该邮箱发送密码重置链接,用户可通过该链接重置密码; +1. 站点管理员已经配置好邮件通知,并且用户已完成电子邮箱验证时,可以点击登录页面的 `找回密码` 链接,填写邮箱后,系统将向该邮箱发送密码重置链接,用户可通过该链接重置密码; 2. 如果不满足上述条件,或者密码重置邮件不能发送成功,请直接联系具有用户管理权限的管理员进行密码重置操作,管理员可参考文档[修改用户密码](./users#修改用户密码)部分修改指定用户的密码; 3. 如果系统没有任何一个能够正常登录控制台且具有用户管理权限的管理员账号,则用户需要通过更新数据库记录的方式重置指定用户的密码。 - :::info 参考 SQL 语句 + :::info 参考 SQL 语句 - 通过以下 SQL 语句,可以将 `admin` 用户的密码重置为 `password`,密码重置后请尽快修改为更加安全的密码。 - - **PostgreSQL** 数据库 + 通过以下 SQL 语句,可以将 `admin` 用户的密码重置为 `password`,密码重置后请尽快修改为更加安全的密码。 - ```SQL - UPDATE - extensions - SET - data = convert_to( - jsonb_set( - convert_from(data, 'UTF-8') :: jsonb, - '{spec,password}', - '"{bcrypt}$2a$10$7tBEL1sNQSr/uWtLZHLmCeA9IGx0I9/Jz//3Uwo/anIm9xdxv.xrO"' - ) :: text, - 'UTF-8' - ) - WHERE - name LIKE '/registry/users/admin'; - ``` + **PostgreSQL** 数据库 - **MySQL** 数据库 + ```SQL + UPDATE + extensions + SET + data = convert_to( + jsonb_set( + convert_from(data, 'UTF-8') :: jsonb, + '{spec,password}', + '"{bcrypt}$2a$10$7tBEL1sNQSr/uWtLZHLmCeA9IGx0I9/Jz//3Uwo/anIm9xdxv.xrO"' + ) :: text, + 'UTF-8' + ) + WHERE + name LIKE '/registry/users/admin'; + ``` - ```SQL - UPDATE - extensions - SET - data = JSON_SET( - CONVERT(data USING utf8mb4), - '$.spec.password', - '{bcrypt}$2a$10$7tBEL1sNQSr/uWtLZHLmCeA9IGx0I9/Jz//3Uwo/anIm9xdxv.xrO' - ) - WHERE - name LIKE '/registry/users/admin'; - ``` - - ::: + **MySQL** 数据库 + + ```SQL + UPDATE + extensions + SET + data = JSON_SET( + CONVERT(data USING utf8mb4), + '$.spec.password', + '{bcrypt}$2a$10$7tBEL1sNQSr/uWtLZHLmCeA9IGx0I9/Jz//3Uwo/anIm9xdxv.xrO' + ) + WHERE + name LIKE '/registry/users/admin'; + ``` + + ::: ### 附件上传提示 `413 Request Entity Too Large` 如何解决? @@ -122,7 +127,7 @@ server { 前台样式不正常或者丢失有很多种问题的可能,最快捷定位问题的方式就是打开浏览器控制台查看具体请求的错误,以下列出了部分导致出现该问题的常见原因: -1. 后台设置的 `博客地址` 与实际访问地址不一致。也可能是开启了 https 之后,无法正常加载 http 资源,将 `博客地址` 改为 https 协议即可。 +1. `外部访问地址` 与实际访问地址不一致。也可能是开启了 https 之后,无法正常加载 http 资源,将 [外部访问地址](../getting-started/install/config.md#halo-独有配置) 改为 https 协议即可。 2. Nginx 配置了静态资源缓存,但没有设置 `proxy_pass`,参考如下: ```nginx diff --git a/versioned_docs/version-2.20/user-guide/plugins.md b/versioned_docs/version-2.20/user-guide/plugins.md index 401d104..fdc3fbe 100644 --- a/versioned_docs/version-2.20/user-guide/plugins.md +++ b/versioned_docs/version-2.20/user-guide/plugins.md @@ -53,7 +53,7 @@ description: 插件管理相关功能说明 ![插件设置](/img/user-guide/plugins/plugin-setting.png) -此处以 `plugin-umami` 插件为例。 +此处以 `Umami` 插件为例。 :::info 你可以点击插件列表指定插件所在行后方的 `···` 更多操作按钮,选择其中的 `重置` 选项将插件提供的设置项恢复为默认值。 diff --git a/versioned_docs/version-2.20/user-guide/posts.md b/versioned_docs/version-2.20/user-guide/posts.md index 2a4a9eb..82efba6 100644 --- a/versioned_docs/version-2.20/user-guide/posts.md +++ b/versioned_docs/version-2.20/user-guide/posts.md @@ -19,10 +19,7 @@ description: 文章管理相关功能说明 4. **发布**:保存并发布文章内容。 :::info -Halo 支持通过插件来拓展文章编辑器,目前 Halo 官方维护了另外两款编辑器插件,可以按需安装使用: - -1. StackEdit:[https://www.halo.run/store/apps/app-hDXMG](https://www.halo.run/store/apps/app-hDXMG) -2. ByteMD:[https://www.halo.run/store/apps/app-HTyhC](https://www.halo.run/store/apps/app-HTyhC) +Halo 支持通过插件来拓展文章编辑器,目前除了 Halo 内置的编辑器,应用市场中还有其他的编辑器可用:[https://www.halo.run/store/apps?tag=editor](https://www.halo.run/store/apps?tag=editor) ::: ## 文章设置 @@ -86,13 +83,17 @@ Halo 支持通过插件来拓展文章编辑器,目前 Halo 官方维护了另 点击分类管理页面右上角的 `新建` 按钮即可新建一个分类。 ![文章分类编辑界面说明](/img/user-guide/posts/category-create.png) +![文章分类编辑界面说明 2](/img/user-guide/posts/category-create-2.png) #### 设置说明 - **名称**:用于在主题端显示的分类名称。 - **别名**:通常用于生成分类归档页面的访问地址。默认路径规则为 `/categories/{slug}`,其中 `slug` 为分类别名,访问该地址即可浏览该分类下的所有文章。分类页路由前缀可[在设置中修改](./settings#主题路由设置)。 - **自定义模板**:自定义分类归档页面的渲染模板,由主题提供支持。 +- **自定义文章模板**:自定义当前分类下所有文章的渲染模板,由主题提供支持。 - **封面图**:分类封面图设置,需要主题支持该功能。 +- **在列表中隐藏**:开启此选项后,此分类和其下子分类,以及其下文章将不会显示在前台的列表中,需要主动访问分类归档页面,此功能仅对第一级目录生效。 +- **阻止文章级联查询**:阻止父级分类在级联文章查询中包含此分类及其子分类。 - **描述**:关于该文章分类的更多描述信息。 - **元数据**:供主题、插件使用的额外数据信息。例如部分主题期望使用不同的颜色对分类进行区分,便可以使用该功能为分类增加颜色相关的元数据。 diff --git a/versioned_docs/version-2.20/user-guide/settings.md b/versioned_docs/version-2.20/user-guide/settings.md index c04b3a1..1e16585 100644 --- a/versioned_docs/version-2.20/user-guide/settings.md +++ b/versioned_docs/version-2.20/user-guide/settings.md @@ -22,28 +22,55 @@ Halo 提供了以下站点基本信息设置: 针对主题端的文章展示,Halo 提供了以下设置项: -- **文章列表显示条数** -- **归档页文章显示条数** -- **分类页文章显示条数** -- **标签页文章显示条数** +- **文章列表显示条数**:首页的文章显示条数。 +- **归档页文章显示条数**:归档页面(\/archives)的文章显示条数。 +- **分类页文章显示条数**:分类归档页面(\/categories\/\{slug\})的文章显示条数。 +- **标签页文章显示条数**:标签归档页面(\/tags\/\{slug\})的文章显示条数。 +- **别名生成策略**: + - 根据标题:自动根据文章标题生成,比如文章标题为 `Hello Halo`,那么别名将生成为 `hello-halo` + - 时间戳:使用当前时间的时间戳作为标题 + - Short UUID:生成类似于 `BT5kIgrb` 的别名 + - UUID:生成类似于 `4f662408-ed90-470b-9ed1-7fdc0283631b` 的别名 +- **附件存储策略**:在编辑器中上传图片时的附件存储策略 +- **附件存储组**:在编辑器中上传图片时的附件分组 ## SEO 设置 针对站点的 SEO(搜索引擎优化)需求,Halo 提供了以下设置项: -- **屏蔽搜索引擎**:配置后会在所有页面 HTML 源码的 head 部分添加 ``。 -- **站点关键词**:格式为以`,`分隔的关键词列表,配置后会在所有页面 HTML 源码的 head 部分添加 ` content="{关键词}" />`。 +- **屏蔽搜索引擎**:配置后会在所有页面 HTML 源码的 head 部分添加: - :::warning 注意 - 目前主流的搜索引擎(如 Google、Bing、百度搜索等)已经不再使用该标签作为关键词的参考,因此该设置项的作用已经不大,未来我们也可能会移除该设置项。 - ::: + ```html + + ``` -- **站点描述**:配置后会在所有页面 HTML 源码的 head 部分添加 ``。 + :::info + 需要注意的是,并不是所有搜索引擎都会遵守这个规则。 + ::: + +- **站点关键词**:格式为以 `,` 分隔的关键词列表,配置后会在所有页面 HTML 源码的 head 部分添加: + + ```html + + ``` + + :::warning 注意 + 目前主流的搜索引擎(如 Google、Bing、百度搜索等)已经不再使用该标签作为关键词的参考,因此该设置项的作用已经不大,未来我们也可能会移除该设置项。 + ::: + +- **站点描述**:配置后会在所有页面 HTML 源码的 head 部分添加: + + ```html + + ``` ## 用户设置 - **开放注册**:是否允许访客注册,勾选之后在登录页面会显示注册入口。 +- **注册需验证邮箱**:开启之后,用户注册时必须要经过邮箱验证,需要配置好 [邮件通知](#通知设置)。 - **默认角色**:新注册用户的默认角色。 +- **头像存储位置**:用户上传头像的存储策略。 +- **个人中心附件存储位置**:用户在个人中心端上传附件时的默认存储策略,需要用户包含上传附件的权限。 ## 评论设置 @@ -74,13 +101,13 @@ Halo 提供了以下站点基本信息设置: - `/{year}/{month}/{slug}` - `/{year}/{month}/{day}/{slug}` - :::info 变量说明 - - `slug`:文章别名 - - `name`:文章 `metadata.name` 字段值 - - `year`:四位数格式的文章发布年份 - - `month`:两位数格式的文章发布月份 - - `day`:两位数格式的文章发布日 - ::: + :::info 变量说明 + - `slug`:文章别名 + - `name`:文章 `metadata.name` 字段值 + - `year`:四位数格式的文章发布年份 + - `month`:两位数格式的文章发布月份 + - `day`:两位数格式的文章发布日 + ::: ## 代码注入 diff --git a/versioned_docs/version-2.20/user-guide/user-center.md b/versioned_docs/version-2.20/user-guide/user-center.md index 0dd309f..14964b7 100644 --- a/versioned_docs/version-2.20/user-guide/user-center.md +++ b/versioned_docs/version-2.20/user-guide/user-center.md @@ -15,29 +15,29 @@ description: 关于个人中心的功能说明 详情可见:[创建角色](./users.md#创建角色) ::: -![Entry](/img/uc/uc-entry.png) +![Uc entry](/img/uc/uc-entry.png) ## 个人资料 这个页面会显示和用户相关的一些信息。 -![Entry](/img/uc/uc-profile.png) +![User profile](/img/uc/uc-profile.png) ## 通知配置 这个页面可以配置用户的通知偏好,可以选择接收哪些类型的通知。 -![Entry](/img/uc/uc-notification-preferences.png) +![Notification preferences](/img/uc/uc-notification-preferences.png) ## 个人令牌 -个人令牌是一种用于访问 Halo API 的凭证,可以通过个人令牌访问 Halo 的 RESTful API,而无需通过用户名和密码授权。 +个人令牌是一种用于访问 Halo API 的凭证,可以通过个人令牌访问 Halo 的 RESTful API,而无需通过用户名和密码授权,使用方式可查阅:[RESTful API 介绍](../developer-guide/restful-api/introduction.md) -![Entry](/img/uc/uc-pat.png) +![Personal access token](/img/uc/uc-pat.png) 创建新的个人令牌: -![Entry](/img/uc/uc-pat-creation.png) +![Create personal access token](/img/uc/uc-pat-creation.png) - **名称**:个人令牌的名称。 - **过期时间**:个人令牌的过期时间,不选择则表示永不过期。 @@ -46,16 +46,30 @@ description: 关于个人中心的功能说明 创建好的个人令牌: -![Entry](/img/uc/uc-pat-token.png) +![Personal access token string](/img/uc/uc-pat-token.png) + +## 两步验证 + +在这个选项卡中,我们可以配置登录之后两步验证方式,目前支持 TOTP 验证器。 + +![Totp](/img/uc/totp.png) + +![Totp Config](/img/uc/totp-config.png) + +## 登录设备 + +在这里可以看到当前账号的所有登录设备,你也可以在更多按钮中撤销任意设备。 + +![User devices](/img/uc/user-devices.png) ## 消息 此页面用于显示用户收到的站内消息。 -![Entry](/img/uc/uc-notifications.png) +![Notifications](/img/uc/uc-notifications.png) ## 我的文章 Halo 默认为个人中心提供了管理个人文章的功能,每个用户都可以在个人中心创建、编辑自己的文章。当然,也可以通过配置角色权限,自行决定是否开放此功能,可查阅[创建角色](./users.md#创建角色)。 -![Entry](/img/uc/uc-posts.png) +![My posts](/img/uc/uc-posts.png) diff --git a/versioned_docs/version-2.20/user-guide/users.md b/versioned_docs/version-2.20/user-guide/users.md index 3ce5545..e912842 100644 --- a/versioned_docs/version-2.20/user-guide/users.md +++ b/versioned_docs/version-2.20/user-guide/users.md @@ -15,18 +15,16 @@ Halo 2.0 版本采用了基于角色的权限控制(RBAC)体系。不同于 在用户管理页面,点击右上角的 `添加用户` 按钮即可弹出新建用户对话框。 -![创建用户](/img/user-guide/users/user-setting.png) +![创建用户](/img/user-guide/users/user-setting-2.20+.png) 目前支持配置的用户属性有: - **用户名**:用户登录 Halo 控制台使用的用户名,不可与已有的用户名重复; - **显示名称**:用于显示文章作者等用户信息时使用的,更友好的用户名称; -- **密码** -- **电子邮箱** -- **手机号** -- **头像** -- **描述** -- **元数据**:供主题、插件使用的额外数据信息。例如部分主题期望展示作者的学历、工作单位等信息,便可以使用该功能为用户增加相关的元数据。 +- **电子邮箱**:用户的电子邮箱; +- **新密码**:用户的初始密码; +- **角色**:用户的初始角色; +- **描述**:可以用于为用户添加备注。 ### 其他操作 @@ -81,7 +79,6 @@ Halo 提供了全新创建和基于已有角色创建两种角色创建方式。 ![创建角色](/img/user-guide/users/role-creation.png) - **名称**:角色的名称。 -- **登录之后默认跳转位置**:用户登录成功后,跳转到指定的页面。 - **禁止访问 Console**:勾选后,该角色的用户将无法进入 Console 管理控制台,只能访问个人中心(/uc)。 - **权限**:角色的权限,可以选择多个权限。 @@ -113,6 +110,6 @@ Halo 提供了全新创建和基于已有角色创建两种角色创建方式。 进入身份认证管理页面之后,如果你已经安装了提供身份认证方式的插件,你就可以在列表中看到对应的身份认证方式,你可以对其进行设置并启用。 -![身份认证方式](/img/user-guide/users/auth-providers.png) +![身份认证方式](/img/user-guide/users/auth-providers-2.20+.png) > 这里是安装了 [OAuth2 认证](https://www.halo.run/store/apps/app-ESVDK) 插件,提供了 `GitHub`、`GitLab`、`Gitee` 三种 OAuth2 认证方式。