Skip to content

Commit

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

* docs: update readme

* docs: update docs

* docs: update

* docs: update readme
  • Loading branch information
Mister-Hope committed Mar 3, 2023
1 parent 008e4e5 commit 6fcc40b
Show file tree
Hide file tree
Showing 33 changed files with 675 additions and 624 deletions.
28 changes: 14 additions & 14 deletions README.md
Expand Up @@ -69,31 +69,31 @@ curl -L https://vanblog.mereith.com/vanblog.sh -o vanblog.sh && chmod +x vanblog

### 其他部署方式

具体请移步项目文档:[快速上手](https://vanblog.mereith.com/guide/docker.html)
具体请移步项目文档:[快速上手](https://vanblog.mereith.com/guide/get-started.html)

## 反代

请参考: [反代](https://vanblog.mereith.com/guide/nginx.html)
请参考: [反代](https://vanblog.mereith.com/reference/reverse-proxy.html)

## 常见问题

> [作者 logo 无法加载](https://vanblog.mereith.com/ref/faq.html#%E5%9B%BE%E7%89%87-%E4%BD%9C%E8%80%85-logo-%E5%8A%A0%E8%BD%BD%E4%B8%8D%E5%87%BA%E6%9D%A5)
> [备份与迁移](https://vanblog.mereith.com/guide/backup.html)
>
> [http error](https://vanblog.mereith.com/ref/faq.html#%E9%83%A8%E7%BD%B2%E5%90%8E-http-error)
> [作者 logo 无法加载](https://vanblog.mereith.com/faq/usage.html#图片-作者-logo-加载不出来)
>
> [docker 镜像拉取慢](https://vanblog.mereith.com/ref/faq.html#docker-%E9%95%9C%E5%83%8F%E6%8B%89%E5%8F%96%E6%85%A2)
> [http error](https://vanblog.mereith.com/faq/deploy.html#部署后-http-error)
>
> [如何外部访问数据库](https://vanblog.mereith.com/ref/faq.html#%E5%A6%82%E4%BD%95%E5%9C%A8%E5%A4%96%E9%83%A8%E8%AE%BF%E9%97%AE%E6%95%B0%E6%8D%AE%E5%BA%93)
> [docker 镜像拉取慢](https://vanblog.mereith.com/faq/deploy.html#docker-镜像拉取慢)
>
> [如何回滚](https://vanblog.mereith.com/ref/faq.html#%E5%A6%82%E4%BD%95%E5%9B%9E%E6%BB%9A)
> [如何外部访问数据库](https://vanblog.mereith.com/faq/deploy.html#如何在外部访问数据库)
>
> [如何升级](https://vanblog.mereith.com/guide/update.html)
> [如何回滚](https://vanblog.mereith.com/faq/update.html#如何回滚)
>
> [更新后后台报错||一直加载中](https://vanblog.mereith.com/guide/update.html#%E6%9B%B4%E6%96%B0%E5%90%8E%E5%90%8E%E5%8F%B0%E6%8A%A5%E9%94%99-%E4%B8%80%E7%9B%B4%E5%8A%A0%E8%BD%BD%E4%B8%AD)
> [如何升级](https://vanblog.mereith.com/guide/update.html)
>
> [备份与迁移](https://vanblog.mereith.com/guide/backup.html)
> [更新后后台报错||一直加载中](https://vanblog.mereith.com/faq/update.html#升级后后台报错或持续加载)
>
> [更多常见问题](https://vanblog.mereith.com/ref/faq.html)
> [更多常见问题](https://vanblog.mereith.com/faq/)
## 关于更新

Expand All @@ -115,7 +115,7 @@ curl -L https://vanblog.mereith.com/vanblog.sh -o vanblog.sh && chmod +x vanblog

## 开发指南

- [开发指南](https://vanblog.mereith.com/ref/dev.html)
- [开发指南](https://vanblog.mereith.com/contribution.html)

## 谁在使用

Expand Down Expand Up @@ -193,8 +193,8 @@ curl -L https://vanblog.mereith.com/vanblog.sh -o vanblog.sh && chmod +x vanblog
打赏时您可以备注名称,我会将您添加至打赏列表中。

<p align="center">
<img alt="打赏-微信" src="/img/wechat.jpg" style="width: 200px;margin-right: 4px;" />
<img alt="打赏-支付宝" src="/img/ali-pay.jpg" style="width: 200px" />
<img alt="打赏-微信" src="/img/wechat.jpg" style="width: 200px;margin-right: 4px;" />
<img alt="打赏-支付宝" src="/img/ali-pay.jpg" style="width: 200px" />
</p>

## 捐赠信息
Expand Down
File renamed without changes
10 changes: 6 additions & 4 deletions docs/.vuepress/theme.ts
Expand Up @@ -23,10 +23,10 @@ export default hopeTheme({

// navbar
navbar: [
{ text: "介绍", icon: "circle-info", link: "/intro" },
{ text: "快速上手", icon: "lightbulb", link: "/guide/get-started" },
{ text: "功能", icon: "star", link: "/features/" },
{ text: "常见问题", icon: "circle-question", link: "/faq/" },
"/intro",
"/guide/get-started",
"/features/",
"/faq/",
{
text: "Demo",
icon: "laptop-code",
Expand Down Expand Up @@ -63,13 +63,15 @@ export default hopeTheme({
imgLazyload: true,
imgSize: true,
include: {
deep: true,
resolvePath: (filePath, cwd) => {
if (filePath.startsWith("@"))
return filePath.replace("@", path.resolve(__dirname, "../"));

return path.resolve(cwd, filePath);
},
},
tabs: true,
tasklist: true,
},
},
Expand Down
18 changes: 9 additions & 9 deletions docs/README.md
@@ -1,14 +1,13 @@
---
index: false
home: true
icon: home
heroImage: /合并.png
index: false
heroText: VanBlog
heroFullScreen: true
heroImage: /merge.png
tagline: 一款简洁实用优雅的高性能个人博客系统。
actions:
- text: 💡 快速上手
link: /guide/docker.html
link: /guide/get-started.html
type: primary

- text: ℹ️ 介绍
Expand All @@ -18,13 +17,14 @@ actions:
- text: ✈️ Demo
link: https://blog-demo.mereith.com
type: secondary

features:
- title: 优雅
icon: bit
icon: clover
details: 前后台都响应式、都支持暗色模式且能自动切换

- title: 功能强大
icon: contrast
icon: jet-fighter
details: 草稿、分类、标签、搜索、TOC、内嵌评论系统、图标和数学公式支持

- title: 定制化
Expand All @@ -44,19 +44,19 @@ features:
details: Lighthouse SEO 近满分,支持百度分析和 GA,支持自定义文章路径

- title: 可量化
icon: table
icon: chart-area
details: 内置强大分析系统与精美看板,同时支持百度和GA,同时具有完善的日志

- title: 现代后台
icon: strong
icon: chess-king
details: 功能齐全的后台,精心优化的编辑器,极致的写作体验

- title: 安全第一
icon: key
details: 内置了可以自定义权限的协作者模式,未来将支持更多登录安全策略

- title: 易于部署
icon: linux
icon: rocket
details: Docker 一键部署,全自动 HTTPS 证书自动申请续期,支持 ARM

copyright: false
Expand Down
10 changes: 8 additions & 2 deletions docs/advanced/custom-nav.md
Expand Up @@ -4,8 +4,14 @@ icon: window-maximize
redirectFrom: /feature/advance/customNav.html
---

VanBlog 支持自定义导航栏菜单(只支持添加新的菜单)
VanBlog 允许你在原有导航栏菜单之外,添加新的自定义菜单

在后台前往 `站点管理/数据管理/导航配置` 即可按需设置,目前最大只支持二级菜单
在后台选择 `站点管理/数据管理/导航配置` 即可按需设置。

![导航配置](https://www.mereith.com/static/img/2201020740e3de301b7e388fbaa84b78.clipboard-2022-09-10.png)

::: note

目前最大只支持二级菜单。

:::
54 changes: 30 additions & 24 deletions docs/advanced/customizing.md
Expand Up @@ -4,32 +4,44 @@ icon: wand-magic-sparkles
redirectFrom: /feature/advance/customizing.html
---

VanBlog 定制化,也就是可以在页面嵌入自己的 HTML、CSS、JS 片段。
VanBlog 通过定制化功能允许你在页面中嵌入自己的 HTML、CSS、JS 片段。

具体在 `站点管理/系统设置/定制化` 选项卡:
<!-- more -->

## 设置方法

使用 `站点管理/系统设置/定制化` 选项卡。

![定制化](https://www.mereith.com/static/img/9489039722c6c97a5232fad790356d9c.clipboard-2022-09-02.png)

默认定制化功能是开启的,你也可以在布局设置中关闭它。这样即便设置了定制化相关的代码,也不会生效。
定制化功能默认开启,你可以在布局设置中关闭它。这样即便设置了定制化相关的代码,也不会生效。

::: tip

定制化使用 VSCode 同款的代码编辑器,支持自动补全。

:::

## 自定义 HTML

PS: 我很自豪地用了 vscode 同款的代码编辑器,带有代码自动补全哦
自定义的 HTML 代码将被插入到每个前台页面布局组件的**最下方**

## 自定义 CSS

自定义 CSS 的代码,会被插入到前台每个页面 `<head>` 中的 `<style>` 标签内。

下面是一些内置的选择器,可能对你有帮助(更多的就不列举了):
::: tip 常见内置元素选择器

- `#nav` 导航栏
- `#nav-mobile` 移动端的抽屉导航栏
- `.markdown-body` 文章主题内容
- `#post-card` 文章卡片
- `#author-card` 作者卡片
- `#toc-card` 目录卡片

| 选择器 | 作用组件 |
| ---------------- | ------------------ |
| `#nav` | 导航栏 |
| `#nav-mobile` | 移动端的抽屉导航栏 |
| `.markdown-body` | 文章主题内容 |
| `#post-card` | 文章卡片 |
| `#author-card` | 作者卡片 |
| `#toc-card` | 目录卡片 |
:::

## 自定义 Script
## 自定义脚本

你可以写一些自定义的 `js` 代码,这些代码会被加载到前台每个页面布局组件的最下面的 `script` 标签内。

Expand All @@ -41,17 +53,11 @@ window.onload = () => {
};
```

## 自定义 HTML

自定义的 HTML 代码将被插入到每个前台页面布局组件的最下方。

## 有啥用?

可以实现很多好玩的功能,比如最近我发现了一个项目: [Sakana! Widget](https://github.com/dsrkafuu/sakana-widget)
## 使用演示

就完全可以通过定制化来自己加个小挂件。
通过定制化,你可以实现很多有趣的功能,比如通过 [Sakana! Widget](https://github.com/dsrkafuu/sakana-widget) 项目,你可以在博客中添加挂件:

![配置展示](https://www.mereith.com/static/img/d2964344217c8db07f80e3e9350495c3.clipboard-2022-09-02.png)
在自定义 HTML 中加入如下代码:

```html
<div id="sakana-widget" style="position: fixed;bottom: 20px;right:40px;"></div>
Expand All @@ -69,6 +75,6 @@ window.onload = () => {
></script>
```

效果:
你就可以得到一个挂件,最终效果如下。

![设置效果](https://www.mereith.com/static/img/1490762740df7e864117dfd46a66470e.clipboard-2022-09-02.png)
File renamed without changes.
44 changes: 25 additions & 19 deletions docs/advanced/rss.md
Expand Up @@ -6,38 +6,44 @@ redirectFrom: /feature/advance/rss.html

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

订阅地址:
<!-- more -->

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

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

::: note
- `<your-site-url>/feed.xml`: RSS 2.0 格式
- `<your-site-url>/feed.json`: JSON 1.1 格式
- `<your-site-url>/atom.xml`: Atom 1.0 格式

RSS 订阅中的 HTML 暂不支持 mermaid 图表。(如果您有好的解决方案请联系我)
导航栏右上角会默认出现 `RSS` 按钮。您可以在后台的 `布局设置` 中关闭此按钮。

:::
VanBlog 包含后端 Markdown 渲染器,因此你可以在支持 HTML 内容的 RSS 阅读器上获得与网页相近的体验。

`RSS feed` 中的 `HTML``Feedbro Reader` 拓展中的预览效果
您可以用喜欢的阅读器来浏览和阅读 RSS

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

您可以用喜欢的阅读器来阅读 RSS,比如我用的 `irreader` 中的效果:
![irreader 阅读效果](https://www.mereith.com/static/img/4b1ab8a59a5b6f0d28eef449db64cbfa.clipboard-2022-09-04.png)

::: note

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

:::

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

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

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

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

RSS 订阅中的作者邮箱优先取自 `评论设置` 中的作者邮箱,其次是启动 VanBlog 时传递的 `EMAIL` 环境变量。
![图标/图片优先级](https://www.mereith.com/static/img/27f6636bfe5a53cf51544ab8affd6961.clipboard-2022-09-04.png)

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

![图标/图片优先级](https://www.mereith.com/static/img/27f6636bfe5a53cf51544ab8affd6961.clipboard-2022-09-04.png)
订阅中每篇文章的 `description` 字段取自文章摘要(即每篇文章 `<!-- more -->` 前面的部分)。

订阅中每篇文章的 `description` 字段取自每篇文章 `more 标记` 前面的部分 (`<!-- more -->`前面的部分,和前台阅读全文前的展示逻辑一样)。但如果没有 `more 标记`,则会包含整篇文章
如果没有 `<!-- more -->`,则会提取全文
19 changes: 0 additions & 19 deletions docs/advanced/social.md

This file was deleted.

0 comments on commit 6fcc40b

Please sign in to comment.