加载中...
hexo 使用技巧
发表于:2023-05-08 |

(42条消息) hexo史上最全搭建教程_zjufangzh的博客-CSDN博客

安装部署

1
npm install --save hexo-deployer-git

More info: Deployment

如果卡住,就换源

1
npm config set registry https://registry.npm.taobao.org

部署到github

1
2
git config --global user.name "yourname"
git config --global user.email "youremail"

可能22端口不行,就在密钥处写个config

1
2
3
Host github.com
Hostname ssh.github.com
Port 443

使用技巧

Hexo 博客插件生成短链

1
npm install hexo-abbrlink --save

修改博客根目录下的 _config.yml 配置文件:

1
2
3
4
5
6
7
8
9
10
11
12
permalink: :year:month:day:abbrlink/   # 具体配置参考Hexo文档https://hexo.io/zh-cn/docs/permalinksCopy
#添加如下的对该插件的配置项:
# abbrlink config
abbrlink:
alg: crc16 #support crc16(default) and crc32
rep: dec #support dec(default) and hex
drafts: false #(true)Process draft,(false)Do not process draft
# Generate categories from directory-tree
# depth: the max_depth of directory-tree you want to generate, should > 0
auto_category:
enable: false
depth:

效果

1
2
3
4
5
6
7
8
9
10
11
crc16 & hex
https://post.zz173.com/posts/66c8.html

crc16 & dec
https://post.zz173.com/posts/65535.html

crc32 & hex
https://post.zz173.com/posts/8ddf18fb.html

crc32 & dec
https://post.zz173.com/posts/1690090958.htmlCopy

修改端口

hexo的启动文件地址node_modules\hexo-server\index.js 修改port即可。

图床

免费就用github+PicGo+typora。

(18条消息) PicGo+GitHub使用_我想养只汤姆猫的博客-CSDN博客_picgo github

上一篇:
Liunx使用
下一篇:
MATLAB学习