笔记:各种国内源

ubuntu服务器换软件源

1
2
3
4
5
6
# 备份原始源文件sources.list
$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
# 编辑文件
$ vi /etc/apt/sources.list
# 保存文件后更新一下
$ sudo apt update

ubuntu桌面换软件源

中国科学技术大学开源软件镜像

笔记:首次使用HEXO

安装node

windows系统官网下载
node16.20.0

因为在此系统上禁止运行脚本

set-ExecutionPolicy RemoteSigned

安装node版本管理器nvm,安装node16.20.0

1
2
3
$ npm install -g n  
$ nvm install 16.20.0
$ nvm use 16.20.0

官方原生搭建

1
2
3
4
5
$ npm install hexo-cli -g
$ hexo init blog
$ cd blog
$ npm install
$ hexo server

查看hexo版本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$ hexo -v
INFO Validating config
hexo: 6.3.0
hexo-cli: 4.3.0
os: win32 10.0.22621
node: 16.20.0
v8: 9.4.146.26-node.26
uv: 1.43.0
zlib: 1.2.11
brotli: 1.0.9
ares: 1.19.0
modules: 93
nghttp2: 1.47.0
napi: 8
llhttp: 6.0.10
openssl: 1.1.1t+quic
cldr: 41.0
icu: 71.1
tz: 2022f
unicode: 14.0
ngtcp2: 0.8.1
nghttp3: 0.7.0

npm更新包工具

1
2
$ npm install npm-check-updates -g
$ ncu -u

配置_config.yml

再续

插件

生成永久链接

1
npm install hexo-abbrlink --save

配置_config.yml

1
2
3
4
permalink: blog/:abbrlink.html # 也可以直接写 :abbrlink/
abbrlink:
alg: crc32 #算法: crc16(default) and crc32
rep: dec #进制: dec(default) and hex

题外话

vuepress 太难用了,官方教程乱七八糟,没有个统一规则。2.0主题数量又太少,搭建都能报错,配置一天失败告终。
总结:自己水平不行。

管理github

1
2
3
4
5
git init
git remote add origin https://github.com/fateplayer/hexoblog
git branch -a
git fetch
git checkout origin/main