Skip to content

Commit

Permalink
Update images in articles
Browse files Browse the repository at this point in the history
  • Loading branch information
mobeicanyue committed Apr 29, 2024
1 parent 16c1f68 commit 7525e75
Show file tree
Hide file tree
Showing 39 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion source/_posts/Compress-deploy-code-size.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ minify:
hexo clean && hexo g
```
可以看到 html 确实被压缩了
![压缩后](after.webp)
![压缩后](https://pic4.zhimg.com/80/v2-faed032ceaaf40e249fe46b2af21c467_1440w.webp)
Binary file removed source/_posts/Compress-deploy-code-size/after.webp
Binary file not shown.
8 changes: 4 additions & 4 deletions source/_posts/Deploy-a-springboot-project-to-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ tar -caf images.tar.zst images
`IntelliJ IDEA` 中,点击右侧栏的 `Maven` 展开找到 `Lifecycle`,先双击执行 `clean`,再执行 `package` 进行打包。
当然,你也可以在终端中执行 `mvn clean package` 命令来打包,这和在 `IDEA` 中执行的效果是一样的。

![构建 jar 包](idea.webp)
![构建 jar 包](https://pic1.zhimg.com/80/v2-014016435bdec1ee44f103ced9db2dd0_1440w.webp)

执行完毕后我们就可以在项目的 `target` 目录下找到打包好的 `jar` 包了。

![找到 jar 包](jar.webp)
![找到 jar 包](https://pic2.zhimg.com/80/v2-8a1ec89db3eee3c40a435a524c86ffc9_1440w.webp)

## 3. 上传到服务器

Expand All @@ -90,9 +90,9 @@ scp -P 22 /path/to/local/file username@server:/path/to/remote/file

值得一提的是 `OpenJDK 21` 正式版于 `2023/09/19` 发布[^1],距今(`2024/04/17`)已经半年多了。但 Debian 这个老顽固 `stable` 源迟迟未能更新至 `OpenJDK 21`,至今还在 `testing` 源中测试。`stable` 源目前仅提供 `OpenJDK 17`

![openjdk21 的计划表](openjdk21.webp)
![openjdk21 的计划表](https://pic3.zhimg.com/80/v2-f5959e59c01a9a22098ed2861d0e6cf2_1440w.webp)

![仍位于 testing 源的 openjdk21](testing.webp)
![仍位于 testing 源的 openjdk21](https://pic4.zhimg.com/80/v2-376f2c6779b47f9127ceb781d4868257_1440w.webp)

不禁想起一个笑话:`Debian stable = Debian stale`.[^2]

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
20 changes: 10 additions & 10 deletions source/_posts/Enable-blog-comment.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tags:
[Giscus 配置页](https://giscus.app/zh-CN)

往下滑动,来到仓库这个选项,填入你的 GitHub 仓库地址。
![填入你的仓库 url](configure1.webp)
![填入你的仓库 url](https://pic4.zhimg.com/80/v2-63ad66bdd73fa2abe329b96135f89923_1440w.webp)

可以看到报错了,这是因为我们还没有满足开启 Giscus 的条件

Expand All @@ -31,25 +31,25 @@ tags:
```

1. 先确保你的仓库是公开的,如果不是,可以在仓库的 Settings 里面修改。或者创建一个新的公开仓库,用来存放博客的评论。
![修改仓库为公开](configure2.webp)
![修改仓库为公开](https://pic1.zhimg.com/80/v2-f6a7d078b2bba550b711d0842a50a510_1440w.webp)

2. 安装 giscus app,点击 [giscus app](https://github.com/apps/giscus) 按钮,跳转到 GitHub 的安装页面,点击 `Install` 按钮,选择你的仓库,安装成功后,会跳转回 Giscus 配置页面。
![安装 giscus app](configure3.webp)
![选择仓库](configure4.webp)
![安装成功](configure5.webp)
![安装 giscus app](https://pic1.zhimg.com/80/v2-48fbbe27f37257b728b6a51c18582e18_1440w.webp)
![选择仓库](https://pic4.zhimg.com/80/v2-e1175a1a8532fad2e0e65e0a1728ed1b_1440w.webp)
![安装成功](https://pic4.zhimg.com/80/v2-9ff4af2af602fe3d8b26b9e9e1b46b47_1440w.webp)

3. 启用 Discussions 功能,点击仓库的 `Settings`,在 `Features` 选项卡下,勾选 `Discussions`

4. 配置 giscus 参数
![配置 giscus 参数](configure6.webp)
![配置 giscus 参数](configure7.webp)
![配置 giscus 参数](https://pic3.zhimg.com/80/v2-3ab1980b9fe5b4569f9c4a83ee39854a_1440w.webp)
![配置 giscus 参数](https://pic2.zhimg.com/80/v2-2d04b343bbeac93921c736e6c040f5d9_1440w.webp)
> 输出 Discussion 的元数据 不知道是什么选项就没有开,有懂的评论区说一下。
现在我们就满足他的要求了
![配置成功](fulfillment.webp)
![配置成功](https://pic2.zhimg.com/80/v2-87f6a97a98bd253ff8fd78b89115aa0d_1440w.webp)

此时来到下面,这个 `script` 标签就会显示你相应的参数。
![参数列表](configure8.webp)
![参数列表](https://pic3.zhimg.com/80/v2-f130a5c4da97dbd1704254cb5098471a_1440w.webp)

## 2. 配置 comment 参数

Expand Down Expand Up @@ -83,7 +83,7 @@ giscus:
检查无误后,清除一下缓存 `hexo clean` 再部署 Hexo 就可以看到评论功能了。

![ok](/posts/7671c28e/ok.webp)
![ok](https://pic3.zhimg.com/80/v2-5958c4ce55d4ea0210a551e7fe10501e_1440w.webp)

如果没有看见评论功能,注意检查一下你的参数配置是否正确。
{% endfold %}
Expand Down
Binary file removed source/_posts/Enable-blog-comment/configure1.webp
Binary file not shown.
Binary file removed source/_posts/Enable-blog-comment/configure2.webp
Binary file not shown.
Binary file removed source/_posts/Enable-blog-comment/configure3.webp
Binary file not shown.
Binary file removed source/_posts/Enable-blog-comment/configure4.webp
Binary file not shown.
Binary file removed source/_posts/Enable-blog-comment/configure5.webp
Binary file not shown.
Binary file removed source/_posts/Enable-blog-comment/configure6.webp
Binary file not shown.
Binary file removed source/_posts/Enable-blog-comment/configure7.webp
Binary file not shown.
Binary file removed source/_posts/Enable-blog-comment/configure8.webp
Binary file not shown.
Binary file removed source/_posts/Enable-blog-comment/fulfillment.webp
Binary file not shown.
Binary file removed source/_posts/Enable-blog-comment/ok.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion source/_posts/Fail2ban-installation-and-usage-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tags:
- 安全
---

![Fail2ban](fail2ban.webp)
![Fail2ban](https://pic4.zhimg.com/80/v2-3e60fbb2f9b8a948d82344a200fee833_1440w.webp)

> Fail2Ban 是一个入侵检测系统框架,它可以监控服务器的日志文件,当发现有暴力破解行为时,会自动封禁攻击者的 IP 地址。可以保护电脑服务器免受暴力破解。它用 Python 编写。能够在具有本地安装的数据包控制系统或防火墙(如 iptables)接口的 POSIX 系统上运行。
Expand Down
Binary file not shown.
8 changes: 4 additions & 4 deletions source/_posts/Fluid-theme-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ npm install --save hexo-theme-fluid
然后在博客目录下创建 _config.fluid.yml,将官方仓库的主题配置 [_config.yml](https://github.com/fluid-dev/hexo-theme-fluid/blob/master/_config.yml) 内容复制过去。

现在目录下有这三个 yml 文件:
![yml-files](yml-files.webp)
![yml-files](https://pic2.zhimg.com/80/v2-052fdc56939475513bf83af1bd6b1bb5_1440w.webp)

可删除 `_config.landscape.yml` , 它是 hexo 默认的主题文件。

Expand Down Expand Up @@ -59,7 +59,7 @@ hexo clean && hexo g && hexo s -o

后访问 `http://localhost:4000/about/` 即可看到效果。

![关于页](about.webp)
![关于页](https://pic2.zhimg.com/80/v2-c807849599bc8439c765cf501ca36419_1440w.webp)

PS: 可以跟着文档把关于页面的几个 icon 一起改了。

Expand All @@ -84,7 +84,7 @@ apple_touch_icon: images/favicon.png

## 6. 修改 slogan 为 api 语录
效果如图所示:
![语录](api-slogan.webp)
![语录](https://pic4.zhimg.com/80/v2-de40d65e16c881935c1acc00eb51ab0f_1440w.webp)

在主题配置 `_config.fluid.yml` 中开启:
```yml
Expand All @@ -105,7 +105,7 @@ index:
既然可以改 slogan 为 api 语录,那么背景图片当然也可以改为 api 图片 笑)。

效果如图所示:
![api 图片](api-bg.webp)
![api 图片](https://pic4.zhimg.com/80/v2-6a515a3f1baedebcec5499c1d20eb467_1440w.webp)

在主题配置 `_config.fluid.yml` 中搜索
```yml
Expand Down
Binary file removed source/_posts/Fluid-theme-installation/about.webp
Binary file not shown.
Binary file removed source/_posts/Fluid-theme-installation/api-bg.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions source/_posts/Generate-unique-links.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ hexo clean && hexo g

### 4. 前后效果对比

![生成前](default-link.webp)
![生成前](https://pic2.zhimg.com/80/v2-aa58064a39041f922d9261902dee3f69_1440w.webp)

![生成后](abbrlink.webp)
![生成后](https://pic4.zhimg.com/80/v2-5b97de8f4c8c0fe578e7b7950a82ce7f_1440w.webp)
Binary file removed source/_posts/Generate-unique-links/abbrlink.webp
Binary file not shown.
Binary file not shown.
8 changes: 4 additions & 4 deletions source/_posts/Hexo-blog-deployment-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ ssh-keygen -t ed25519 -C "[email protected]"

`Key type` 选择 `Authentication Key`,随便起一个 Tittle,复制你刚刚生成的 `id_ed25519.pub` 内容到 `Key` 中,点击 `Add SSH key` 保存。

![将 SSH 密钥添加到 Github](image1.webp)
![将 SSH 密钥添加到 Github](https://pic3.zhimg.com/80/v2-4b9ba3553dc717bd9723afb9ee43a7fe_1440w.webp)


## 1. 安装 Hexo
Expand All @@ -91,7 +91,7 @@ hexo -v

点击 Github 首页左导航栏的 `New` 按钮,新建一个仓库,仓库名建议为 `用户名.github.io`。将 `用户名` 替换为你的 Github 用户名。

![新建仓库](image.webp)
![新建仓库](https://pic1.zhimg.com/80/v2-ca65acc37e795a863ce23f2282ec6e1c_1440w.webp)

然后点击 `Create repository` 按钮,完成仓库的创建。

Expand Down Expand Up @@ -123,7 +123,7 @@ git push -u origin main gh-pages
## 5. 配置 Github Pages

点击仓库的 `Settings`,点击左边导航栏的 `Pages`。选择 `Branch``gh-pages` 分支,点击 `Save` 保存。
![选择部署分支](image2.webp)
![选择部署分支](https://pic1.zhimg.com/80/v2-f3c82ba51458689af83e72d8228eaae8_1440w.webp)

## 6. 编写 Github Actions 配置文件

Expand Down Expand Up @@ -193,5 +193,5 @@ git push

即可查看到你的博客

![博客首页](image3.webp)
![博客首页](https://pic1.zhimg.com/80/v2-313dd9a390364bf21812010b4dcc77dc_1440w.webp)

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 5 additions & 5 deletions source/_posts/How-to-Deploy-a-new-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ date: 2024-03-01 22:25:20

而云服务器提供商有很多,比如阿里云、腾讯云、华为云、亚马逊云等等。

![阿里云的 ECS 简介](p470846.webp)
![阿里云的 ECS 简介](https://pic4.zhimg.com/80/v2-7c0b3970795ca4710d6ed4c50a3e5383_1440w.webp)

而其价格根据配置、地区、带宽等也有所不同,我们可以根据自己的需求来选择。

![腾讯轻量云活动](tencent-cloud.webp)
![腾讯轻量云活动](https://pic1.zhimg.com/80/v2-451ed34fbe3762fc35d33d51a5bef524_1440w.webp)

需要特别注意的是,如果你购买的服务器在中国内地(大陆),必须完成 ICP 备案才可对外提供服务。备案是什么以及如何备案,就不在本文讨论范围内了。

Expand All @@ -70,11 +70,11 @@ date: 2024-03-01 22:25:20
而 DNS(Domain Name System)是一个分布式数据库,用于存储域名和 IP 地址之间的映射关系。当我们在浏览器中输入一个域名时,浏览器会向 DNS 服务器查询域名对应的 IP 地址,然后再通过这个 IP 地址来访问服务器。

![DNS 查询过程](dns-lookup.webp)
![DNS 查询过程](https://pic2.zhimg.com/80/v2-361795da46a8bea1a7a279ec2bcd2729_1440w.webp)

**将我们的域名解析到服务器的 IP 地址,就可以通过域名来访问我们的服务器了。**域名注册商一般都会提供 DNS 服务,我们可以在域名注册商的控制台中进行域名解析。

![域名解析](resolve.webp)
![域名解析](https://pic2.zhimg.com/80/v2-bbecd6cb7f4141ad2a583dc2430843dd_1440w.webp)

你可以选择国内外的知名域名注册商,比如阿里云、腾讯云、GoDaddy、Namecheap、Dynadot 等等。不推荐使用白嫖的域名 —— 因为你的域名所有权得不到保障。

Expand Down Expand Up @@ -268,7 +268,7 @@ ssh root@<服务器 IP 地址> -p 2222
SSH 密钥登录是一种更加安全的登录方式,它不需要输入密码,而是通过密钥对来进行验证。这样就可以避免密码被暴力破解。

SSH 密钥加密原理是使用非对称加密算法,原理如下[^1]
![非对称加密算法](asymmetric-encryption.webp)
![非对称加密算法](https://pic2.zhimg.com/80/v2-8e97a3e00c822f160241ba31cc8f8579_1440w.webp)

密钥对分为公钥和私钥,公钥存放在服务器上,私钥存放在本地。当我们使用 SSH 密钥登录时,本地的私钥会与服务器上的公钥进行匹配,如果匹配成功,就可以登录到服务器。

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 7525e75

Please sign in to comment.