Hello World
Mar 20, 2017
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick Start
Create a new blog
1 | $ hexo init |
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
Question
运行hexo server
,浏览器输入http://localhost:4000 无法访问
产生原因可能是端口占用。
Windows下运行命令netstat -ano | findstr 4000
,看是否有有进程占用了4000端口。
这是安装了福昕PDF阅读器的原因,将Foxitprotect.exe
进程结束即可。
安装主题
1 | git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia |
修改hexo根目录下的 _config.yml : theme: yilia
之后运行
1 | hexo g |
修改头像
hexo根目录下source文件夹中新建assets\img文件夹,将头像文件复制进去
修改主题目录中的_config.yml :avatar: /assets/img/avatar.jpg
添加标签
1.添加标签
1 | tag: 标签 |
2.添加多个标签
1 | tags: [标签1,标签2,标签3] |
或者:
1 | tags: |
文章部分显示
使用<!-- more -->
标签来隐藏其下面的内容~