Hexo搭建
教程
http://blog.csdn.net/gdutxiaoxu/article/details/53576018
主题github地址
yilia https://github.com/litten/hexo-theme-yilia.git
NexT https://github.com/iissnan/hexo-theme-next.git
hexo配置
http://blog.csdn.net/xuezhisdc/article/details/53130383
新建文章1
hexo new post "article title"
生成部署1
2
3
4hexo g # 生成
hexo d # 部署
# 或直接
hexo d -g # 在部署前先生成
记录
部署:将生成在public文件夹内的文件复制到deploy.git内后,自动推送到git,自动部署需要安装插件,并配置发布地址等
新建文章的 命名、分类、标签:不能包含
#
符号,Github上面会404,其他的\/.?
之类的应该也不行,-_
以及数字是可以的自定义页面,不渲染
hexo跳过指定文件的渲染
在_config.yml
文件中设置skip_render
,都是相对source
目录的路径:
跳过
source
目录下的test.html
:test.html``` 1
2* 跳过`source`目录下`test`文件夹内所有文件:
```skip_render: test/*跳过source目录下
test
文件夹内所有文件包括子文件夹以及子文件夹内的文件:test/**``` 1
2
3
4
5* 跳过多个路径:
```yml
skip_render:
- test.html
- test/*
_post
文件夹下是可以新建自己的文件夹的
hexo标签插件
jsFiddle
在文章中嵌入 jsFiddle。1
{% jsfiddle shorttag [tabs] [skin] [width] [height] %}
Gist
在文章中嵌入 Gist。1
{% gist gist_id [filename] %}
iframe
在文章中插入 iframe。1
{% iframe url [width] [height] %}
Image
在文章中插入指定大小的图片。1
{% img [class names] /path/to/image [width] [height] [title text [alt text]] %}
Link
在文章中插入链接,并自动给外部链接添加 target=”_blank” 属性。1
{% link text url [external] [title] %}
- 代码块高亮
c#代码块标记(c#
标记无效):cs
、csharp
配置文件类型(*:*
这种):yml