关于

关于我自己

我叫bambrow,转专业计算机小白一枚。努力提升自己中。

本博客的副标题「Half as much, twice as elegant」出自我最喜欢的电影之一:Blade Runner 2049。本意是表现生命与人工智能的不同,但不知为何,只看了一遍,这句话就深深刻在了我的脑海里。

那就顺便列举一下我最喜欢的几部电影吧:

关于本博客

本博客暂时作为我的纯技术博客,但以后可能会加入新的内容。最终的目的是记录自己技术上的成长与人生的感悟。

  • 「博客」部分为我的个人创作文章,有些是原创,有些是转译,有些则取材或总结自他人的作品;
  • 「笔记」部分为我的技术类学习笔记,大多为非原创内容,作为个人在技术上持续成长的记录;
  • 「应用 & 服务」部分则列举了一些个人使用起来比较方便的应用和服务。

本博客通过 GitHub Actions 自动部署发布,以下为本博客使用的相关依赖与工作流信息。

项目依赖信息

package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
"name": "hexo-site",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "hexo generate",
"clean": "hexo clean",
"deploy": "hexo deploy",
"server": "hexo server"
},
"hexo": {
"version": "5.4.0"
},
"dependencies": {
"@renbaoshuo/markdown-it-katex": "^2.0.2",
"hexo": "^5.4.0",
"hexo-blog-encrypt": "^3.1.6",
"hexo-deployer-git": "^3.0.0",
"hexo-generator-archive": "^1.0.0",
"hexo-generator-category": "^1.0.0",
"hexo-generator-index": "^2.0.0",
"hexo-generator-searchdb": "^1.4.0",
"hexo-generator-sitemap": "^2.1.0",
"hexo-generator-tag": "^1.0.0",
"hexo-leancloud-counter-security": "^1.5.0",
"hexo-related-popular-posts": "^5.0.1",
"hexo-renderer-ejs": "^1.0.0",
"hexo-renderer-markdown-it": "^5.0.0",
"hexo-renderer-stylus": "^2.0.1",
"hexo-server": "^2.0.0",
"hexo-theme-next": "^8.13.1",
"hexo-word-counter": "0.0.3",
"katex": "^0.16.3"
}
}

项目工作流信息

.github/workflows/main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Hexo Blog Deploy
name: Hexo Blog Deploy

# Trigger the workflow on push
on:
push:
branches:
- master

# Build on ubuntu
jobs:
build:
runs-on: ubuntu-latest

steps:
# Checkout
- name: Checkout repository master branch
uses: actions/checkout@master

# Install node.js
- name: Install node.js
uses: actions/setup-node@master
with:
node-version: "16.x"

# Install hexo
- name: Install hexo
run: |
npm install hexo-cli -g
npm install
npm uninstall hexo-renderer-marked
npm uninstall hexo-theme-landscape

# Setup SSH private key
- name: Setup private key
env:
HEXO_DEPLOY_PRIVATE_KEY: ${{ secrets.HEXO_DEPLOY_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh/
echo "$HEXO_DEPLOY_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts

# Setup git settings
- name: Setup git settings
run: |
git config --global user.name "bambrow"
git config --global user.email "bambrow@icloud.com"

# Temporary fix: hexo-leancloud-counter-security
- name: Temporary fix hexo-leancloud-counter-security
run: |
mv node_modules/hexo-leancloud-counter-security/index.js node_modules/hexo-leancloud-counter-security/index.js.bak
mv source/_scripts/hexo-leancloud-counter-security-fix.js node_modules/hexo-leancloud-counter-security/index.js

# Temporary extension: hexo-blog-encrypt
- name: Temporary extension of hexo-blog-encrypt
run: |
mv node_modules/hexo-blog-encrypt/index.js node_modules/hexo-blog-encrypt/index.js.bak
mv source/_scripts/hexo-blog-encrypt-index-extended.js node_modules/hexo-blog-encrypt/index.js

# Temporary fix: sidebar after encryption
- name: Temporary fix sidebar after encryption
run: |
mv node_modules/hexo-theme-next/layout/_macro/sidebar.njk node_modules/hexo-theme-next/layout/_macro/sidebar.njk.bak
mv source/_scripts/sidebar-fix.njk node_modules/hexo-theme-next/layout/_macro/sidebar.njk

# Deploy
- name: Deploy hexo
run: |
hexo clean
hexo generate
hexo deploy