Skip to content

Commit

Permalink
docs: rebuild (#191)
Browse files Browse the repository at this point in the history
* docs: update docs

* docs: merge faq

* docs: update docs

* docs: add redirect plugin

* docs: update sidebar
  • Loading branch information
Mister-Hope authored Feb 28, 2023
1 parent 97ac9cc commit 896253a
Show file tree
Hide file tree
Showing 65 changed files with 915 additions and 1,068 deletions.
7 changes: 2 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"eslint.validate": [
"javascript",
"typescript"
],
"eslint.validate": ["javascript", "typescript"],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
}
}
1 change: 0 additions & 1 deletion docker-compose/docker-compose-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ services:
TZ: "Asia/Shanghai"
volumes:
- vanblog_data_path/data/mongo:/data/db

1 change: 0 additions & 1 deletion docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ services:
TZ: "Asia/Shanghai"
volumes:
- ${PWD}/data/mongo:/data/db

5 changes: 3 additions & 2 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineUserConfig } from "vuepress";
import { redirectPlugin } from "vuepress-plugin-redirect";
import { searchProPlugin } from "vuepress-plugin-search-pro";
import theme from "./theme.js";

Expand Down Expand Up @@ -26,9 +27,9 @@ s.parentNode.insertBefore(hm, s);
],
],

plugins: [searchProPlugin({ indexContent: true })],
plugins: [searchProPlugin({ indexContent: true }), redirectPlugin()],

theme,

pagePatterns: ["**/*.md", "!*.snippet.md", "!.vuepress", "!node_modules"],
pagePatterns: ["**/*.md", "!**/*.snippet.md", "!.vuepress", "!node_modules"],
});
4 changes: 2 additions & 2 deletions docs/.vuepress/navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { navbar } from "vuepress-theme-hope";
export default navbar([
{ text: "介绍", icon: "advance", link: "/intro" },
{ text: "快速上手", icon: "creative", link: "/guide/docker" },
{ text: "功能", icon: "launch", link: "/feature/basic/article" },
{ text: "参考", icon: "list", link: "/ref/env" },
{ text: "功能", icon: "launch", link: "/features/" },
{ text: "参考", icon: "list", link: "/ref/" },
{ text: "Demo", icon: "navigate", link: "https://blog-demo.mereith.com" },
{
text: "交流群",
Expand Down
64 changes: 11 additions & 53 deletions docs/.vuepress/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,68 +6,26 @@ export default sidebar([
text: "快速上手",
icon: "creative",
prefix: "/guide/",
children: ["docker", "https", "init", "update", "nginx", "faq", "backup"],
children: "structure",
},
{
text: "功能",
icon: "strong",
prefix: "/feature/",
children: [
{
text: "基本功能",
icon: "launch",
prefix: "basic/",
children: [
"article",
"draft",
"editor",
"about",
"setting",
"comment",
"pic",
"overview",
"category",
"tag",
"migrate",
],
},
{
text: "进阶功能",
icon: "advance",
collapsible: true,
prefix: "advance/",
children: [
"https",
"rss",
"customizing",
"customPage",
"collaborator",
"backup",
"log",
"secure",
"isr",
"dark-mode",
"links",
"donate",
"social",
"search",
"top",
"seo",
"hidden",
"private",
"customNav",
"version",
"visitor",
"restore",
],
},
],
prefix: "/features/",
children: "structure",
},
{
text: "高级",
icon: "strong",
collapsible: true,
prefix: "/advanced/",
children: "structure",
},
{
text: "参考",
icon: "list",
prefix: "/ref/",
collapsible: true,
prefix: "/ref/",
children: "structure",
},
]);
5 changes: 3 additions & 2 deletions docs/feature/advance/backup.md → docs/advanced/backup.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
title: 导入导出
redirectFrom: /feature/advance/backup.html
---

::: tip 备份与迁移
::: warning 备份与迁移

除了这种方式外,更推荐的无感迁移/备份方式请移步: [备份与迁移](../../guide/backup.md)
我们更推荐你使用 [备份与迁移](../guide/backup.md)

:::

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
---
title: 协作者
redirectFrom: /feature/advance/collaborator.html
---

`vanBlog` 支持添加自定义权限的协作者用户。具体在 `站点管理/系统设置/用户设置` 中:
VanBlog 支持添加自定义权限的协作者用户。

你需要在 `站点管理/系统设置/用户设置` 中进行相关设置:

![用户设置](https://www.mereith.com/static/img/726f7b197b240a923b8473106d3d1200.clipboard-2022-09-03.png)

<!-- more -->

## 账户权限

协作者账户默认**只具有以下权限**

- 文章、列表、图片的查看权限
Expand All @@ -31,6 +38,6 @@ title: 协作者

### 作者问题

在创建文章或草稿时,默认的作者登录者本人的昵称(如果是管理员则是站点管理中设置的作者名称)。
在创建文章或草稿时,默认的作者为当前登录账户昵称(如果是管理员则是站点管理中设置的作者名称)。

此作者也会显示在前端的版权声明中。
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: 自定义导航栏
redirectFrom: /feature/advance/customNav.html
---

VanBlog 支持自定义导航栏菜单(只支持添加新的菜单)。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: 自定义页面
redirectFrom: /feature/advance/custom-page.html
---

VanBlog 支持自定义页面,但首先请您明确自己的需求。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: 客制化(嵌入自定义 HTML、CSS、JS)
redirectFrom: /feature/advance/customizing.html
---

VanBlog 客制化,也就是可以在页面嵌入自己的 HTML、CSS、JS 片段。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: 黑暗模式与响应式
redirectFrom: /feature/advance/dark-mode.html
---

VanBlog 的前后台都支持黑暗模式和自动切换。并且都适配了从移动端到 PC 端的各种尺寸布局。
Expand Down
3 changes: 2 additions & 1 deletion docs/feature/advance/donate.md → docs/advanced/donate.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
title: 捐赠管理
redirectFrom: /feature/advance/donate.html
---

`vanBlog` 支持 `捐赠信息` 展示,会展示在关于页面的最下方(前提是至少有一个捐赠条目并在`站点管理/系统设置/站点配置/布局设置`中开启了`显示捐赠信息`的选项)
VanBlog 支持 `捐赠信息` 展示,会展示在关于页面的最下方(前提是至少有一个捐赠条目并在`站点管理/系统设置/站点配置/布局设置`中开启了`显示捐赠信息`的选项)

![显示捐赠](https://pic.mereith.com/img/664c4ed0eb81788bae4500a962b88a87.clipboard-2022-08-15.png)

Expand Down
16 changes: 16 additions & 0 deletions docs/advanced/encrypt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: 加密文章
redirectFrom: /feature/advance/private.html
---

VanBlog 支持对文章进行加密。加密后,前台的文章将被隐藏,需要输入密码之后才能看到内容。密码会在后端验证,并只有匹配时才会把文章数据返回前端。

![文章列表](https://pic.mereith.com/img/a694826dd1a45976cc652087640c41c1.clipboard-2022-08-16.png)

![文章详情](https://pic.mereith.com/img/fad60a38e0d6819bfe6089108fe4142a.clipboard-2022-08-16.png)

## 加密方法

- 在创建文章时勾选加密,并输入密码。
- 在编辑器页面点击 `修改信息`,勾选加密并输入密码。
- 在发布草稿时勾选加密并输入密码。
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
---
title: 友情链接
redirectFrom: /feature/advance/links.html
---

VanBlog 支持 `友情链接` 展示,(前提是在 `站点管理/系统设置/站点配置/布局设置` 中开启了 `显示友情链接` 的选项)
VanBlog 支持 `友情链接` 展示,

::: tip

你需要在 `站点管理/系统设置/站点配置/布局设置` 中开启 `显示友情链接` 选项。

:::

![友情链接展示](https://pic.mereith.com/img/8daaa28eeac7e3a3de0e4717026f54ab.clipboard-2022-08-15.png)

Expand Down
1 change: 1 addition & 0 deletions docs/feature/advance/hidden.md → docs/advanced/hidden.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: 隐藏文章
redirectFrom: /feature/advance/hidden.html
---

VanBlog 支持对文章进行 `隐藏`。选择隐藏后,前台将不会该显示文章的所有信息,该文章也不会计入总字数、标签、分类数量统计或者出现在时间线界面。但后台将正常显示该文章,并可以取消隐藏状态。
Expand Down
6 changes: 4 additions & 2 deletions docs/guide/https.md → docs/advanced/https.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
icon: selection
title: HTTPS
copyright: false
order: -3
redirectFrom:
- /guide/https.html
- /feature/advance/https.html
---

VanBlog 镜像内采用了 Caddy 作为反向代理,并支持全自动按需 HTTPS 证书申请配置。
Expand All @@ -29,7 +31,7 @@ VanBlog 首次运行默认关闭 HTTPS,请通过 HTTP 协议访问。无需多

你可以点击 `使用当前访问域名触发按需申请` 按钮手动触发一下证书申请。

触发请后稍等一会(申请时间取决于网络环境。若成功,页面将通过 HTTPS 正常加载。
触发请后稍等一会(申请时间取决于网络环境。若成功,页面将通过 HTTPS 正常加载。

![申请证书](https://pic.mereith.com/img/8383fb4f32144be26cb134c2390d6d10.clipboard-2022-08-23.png)

Expand Down
1 change: 1 addition & 0 deletions docs/feature/advance/isr.md → docs/advanced/isr.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: 静态页面更新策略
redirectFrom: /feature/advance/isr.html
---

您可以在后台的 `系统设置/高级设置` 中更改静态页面更新策略或者强制触发静态页面更新:
Expand Down
5 changes: 3 additions & 2 deletions docs/feature/advance/restore.md → docs/advanced/restore.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
---
title: 忘记密码
redirectFrom: /feature/advance/restore.html
---

`VanBlog` 支持忘记密码恢复,在登录页面点击`忘记密码`,输入正确的恢复密钥即可重置超级管理员用户。
VanBlog 支持忘记密码恢复,在登录页面点击`忘记密码`,输入正确的恢复密钥即可重置超级管理员用户。

![](https://pic.mereith.com/img/471a81dc548ad543814a6bbf7315ccf1.clipboard-2022-09-20.png)

## 恢复密钥获取方式

### 1.容器运行日志

您可以在容器运行日志中看到恢复密钥,每次 `VanBlog` 启动或老密钥被使用都会重新生成恢复密钥并打印在运行日志中:
您可以在容器运行日志中看到恢复密钥,每次 VanBlog 启动或老密钥被使用都会重新生成恢复密钥并打印在运行日志中:

![](https://pic.mereith.com/img/471a81dc548ad543814a6bbf7315ccf1.clipboard-2022-09-20.png)

Expand Down
42 changes: 42 additions & 0 deletions docs/advanced/rss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: RSS
redirectFrom: /feature/advance/rss.html
---

VanBlog 内置了 `RSS feed 生成器` ,开箱即用。

订阅地址:

- `<your-site-url>/feed.xml`
- `<your-site-url>/feed.json`
- `<your-site-url>/atom.xml`

VanBlog 包含后端 Markdown 渲染器,所以你可以在 `RSS 阅读器` 上获得与网站本体尽可能相近的体验(在读取订阅源中 HTML 的情况下)。

::: note

RSS 订阅中的 HTML 暂不支持 mermaid 图表。(如果您有好的解决方案请联系我)

:::

`RSS feed` 中的 `HTML``Feedbro Reader` 拓展中的预览效果:

![浏览效果](https://www.mereith.com/static/img/bf84404095bdcf8c4a186e0bb1e48429.clipboard-2022-09-04.png)

您可以用喜欢的阅读器来阅读 RSS,比如我用的 `irreader` 中的效果:

![阅读效果](https://www.mereith.com/static/img/4b1ab8a59a5b6f0d28eef449db64cbfa.clipboard-2022-09-04.png)

## 前台按钮

默认在所有屏幕尺寸下,导航栏右上角均会出现 `RSS` 按钮。您可以在后台的 `布局设置` 中关闭此选择,关闭后前台所有位置都将不会显示 `RSS` 按钮。

## 注意

RSS 订阅中的作者邮箱优先取自 `评论设置` 中的作者邮箱,其次是启动 VanBlog 时传递的 `EMAIL` 环境变量。

订阅中的 `favicon``images` 属性的优先级如下:

![图标/图片优先级](https://www.mereith.com/static/img/27f6636bfe5a53cf51544ab8affd6961.clipboard-2022-09-04.png)

订阅中每篇文章的 `description` 字段取自每篇文章 `more 标记` 前面的部分 (`<!-- more -->`前面的部分,和前台阅读全文前的展示逻辑一样)。但如果没有 `more 标记`,则会包含整篇文章。
1 change: 1 addition & 0 deletions docs/feature/advance/secure.md → docs/advanced/secure.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: 登录安全策略
redirectFrom: /feature/advance/secure.html
---

您可以在后台的 `系统设置/高级设置` 中更改登录安全策略:
Expand Down
3 changes: 2 additions & 1 deletion docs/feature/advance/seo.md → docs/advanced/seo.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
title: 搜索引擎优化
redirectFrom: /feature/advance/seo.html
---

`VanBlog` 内置一些搜索引擎优化策略,开箱即用,无需任何配置。具体有:
VanBlog 内置一些搜索引擎优化策略,开箱即用,无需任何配置。具体有:

## 前台均为静态页面

Expand Down
3 changes: 2 additions & 1 deletion docs/feature/advance/social.md → docs/advanced/social.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
title: 联系方式配置
redirectFrom: /feature/advance/social.html
---

`vanBlog` 支持配置作者卡片中的 `联系方式`
VanBlog 支持配置作者卡片中的 `联系方式`

![](https://pic.mereith.com/img/55d193df8bc0448f1d8f8e2dcb5624a9.clipboard-2022-08-15.png)

Expand Down
14 changes: 14 additions & 0 deletions docs/advanced/sticky.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: 置顶
redirectFrom: /feature/advance/top.html
---

VanBlog 支持对文章进行 `置顶`,是通过设置文章的优先级来实现的。优先级必须为数字,留空或者为 0 表示不顶置,否则会把数字大的拍到最前面。(默认的话是时间倒序的,新建的文章放到最前面。

![](https://pic.mereith.com/img/b7af71d314dc73d4ff27b21c9f7bdbeb.clipboard-2022-08-16.png)

## 设置方法

- 在创建文章时设置优先级
- 在编辑器页面点击`修改信息`,修改优先级
- 在发布草稿时设置优先级
Loading

0 comments on commit 896253a

Please sign in to comment.