主要介绍一下,使用hexo主题的blog的常用的一些命令。此文主要是用来做测试的。。
一、常用命令
1.新建文章
1) hexo new “xxx” ##xxx默认是放在 hexo/source/_posts/ 目录下面
2) 或者把编译好的md文件放在此目录。
2.新建页面
hexo new page “xxx” ##这个可以用作链接
3.如何分类,添加tag
1 | --- |
4.只显示部分
在需要的地方添加
1 | <!-- more --> |
5.添加访问统计和目录可以参考以下链接,这里就不copy了
Hexo + yilia 搭建博客可能会遇到的所有疑问
6.hexo使用中遇到的git的错误
error:
1 | Error: ssh: connect to host github.com port 22: Connection timed out |
解决方法:链接
1)主要就是在.ssh目录下添加config文件,内容如下
1 | Host github.com |
2)chmod 777 config
3)再次执行”ssh -T git@github.com”时,会出现提示如下,回车”yes”即可。
7.添加外链音乐
网易云音乐:在网易云搜索音乐,然后生成外置链接,贴过来就可以了。
8.添加微信公众号图片
1)markdown的方式:
1 |  |
效果:
2)缩放:
1 | <img src="/img/weixin_gzh.jpg" width="50%" height="50%"> |
效果:
3)居中:
1 | <div align="center"> |
效果:
9.Markdown语法
有空再加
二、官方说明
Create a new post
1 | $ hexo new "My New Post" |
More info: Writing
Run server
1 | $ hexo server |
More info: Server
Generate static files
1 | $ hexo generate |
More info: Generating
Deploy to remote sites
1 | $ hexo deploy |
More info: Deployment