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
1 | hexo clean && hexo g && hexo s |
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
博客摘要
方法一:写概述
在文章的front-matter
中添加description
,其中description中的内容就会被显示在首页上,其余一律不显示。
1 | title: 让首页显示部分内容 |
比较不方便的是还得写一下概述,很多时候会懒得写概述,于是就需要第二种方法了。
方法二:文章截断
在需要截断的地方加入:
1 | <!--more--> |
首页就会显示这条以上的所有内容,隐藏接下来的所有内容。
例如本文会显示到修改配置上面。
这个明显就方便很多,但当然有利有弊,比如开头都是废话首页看着就不是很好看,因此我一般会先选择方法二,如果感觉文章前面的写的不太好再用方法一。