前言:
介绍博客的一些用法、功能以及相关插件…
相关插件
Hexo相关初始化配置
1  | npm install -g hexo-cli  | 
安装自动部署发布工具
1  | npm install hexo-deployer-git --save  | 
分页插件
1  | npm install --save hexo-generator-index  | 
文章字数与阅读时长 wordcount 插件
1  | npm install hexo-wordcount --save  | 
RSS订阅功能
1  | npm install hexo-generator-feed --save  | 
站内搜索
1  | npm install --save hexo-generator-searchdb  | 
Gitment评论
1  | npm i --save gitment  | 
文章加密
1  | npm install --save hexo-blog-encrypt  | 
hexo-admin文章管理
1  | npm install --save hexo-admin  | 
图片上传相册
git连接远程Blog_Album
此小块所有命令均在
Blog_Album目录下打开终端执行
(1) 执行git remote add origin https://github.com/luxiong-github/Blog_Album.git为本地仓库添加一个远程仓库
如果此处出现fatal: remote origin already exists.错误,说明远程起源已经存在,则先执行git remote rm origin再执行上述命令
(2) 拉取远程仓库代码:git pull --rebase origin master(远程仓库被更新本地没更新才需要执行)git pull --rebase origin master
上传照片
(1) 将照片放到Blog_Album\photos目录中,命名格式:yyyy-MM-dd_des.jpg/jpeg/gif/png.(脚本解析jpg有问题,最好使用png)
(2) 终端切换到Blog_Album目录下(或者直接在Blog_Album目录下shift+鼠标右键打开PowerShell窗口),执行python tool.py命令
如果出现
error: failed to push some refs to错误,说明本地没有update到最新版本的项目(git上有README.md文件没下载下来),执行此处命令
(3) 如果上述命令执行无误,则可进入自己GitHub的Blog_Album仓库中进行查看
(4) hexo g && hexo s进入博客查看
参考:https://malizhi.cn/HexoAlbum/
源码提交gitee
(1) my-blog目录下打开终端,输入命令初始化创建一个空的本地仓库:
1  | git init  | 
(2) 将本地库与远程仓库(gitee)进行链接:
1  | git remote add origin https://gitee.com/luxiong-gitee/blog-code.git  | 
(3) 将项目的所有文件添加到缓存中:
1  | git add .  | 
(4) 将缓存中的文件Commit到git库:
1  | git commit -m "项目源码上传"  | 
(5) 上传代码之前最好先pull一下(拉取远程仓库最新代码):
1  | git pull origin master  | 
(6) 代码提交到远程库:
1  | git push origin master  | 
待优化项目
Fork me on GitHub
1
2
3<a href="https://github.com/luxiong-github">
<img width="149" height="149" src="https://github.blog/wp-content/uploads/2008/12/forkme_right_darkblue_121621.png?resize=149%2C149" class="attachment-full size-full" alt="Fork me on GitHub" data-recalc-dims="1">
</a>流程图
URL优化
站点提交百度、Google https://malizhi.cn/nextTutorial/#more