0%

问题背景
路径后面会多一层域名的.work
比如域名为yuxiang.work,图片会被链接到下面的路径
微信截图_20220126180401.png

解决方案
修改插件的源码index.js
微信截图_20220126180652.png

hexo安装

1
2
3
4
npm install -g hexo-cli
hexo init myblog
cd myblog
npm install

hexo部署

1
2
3
4
5
6
7
8
9
#生成静态文章
hexo generate
#或
hexo g

# 部署文章
hexo deploy
#或
hexo d

发布文章

在发布之前了解下默认的3种布局(layout)

布局 路径 含义
post source/_posts 发布
page source 另起一页
draft source/_drafts 草稿

可以修改3中布局模版达到定制效果

1
2
# 发布命令
hexo new [layout] <title>
1
2
3
4
5
6
7
8
# 3种发布命令
hexo new page test
hexo new draft test

# 默认使用的是post的模版
hexo new post test
# 或
hexo new test(新建文章 名test)
1
2
3
4
#草稿预览:
hexo server --draft
#草稿的发布:
hexo publish draft test