0%

Hexo Hello World

Quick Start

插入图片

1
{% asset_img slug [千与千寻的神隐] %}

插入PDF

1
2
$ npm install --save hexo-pdf
{% pdf polar.pdf %}

插入音频

1
2
3
<div align="center">
<audio src="11.mp3" controls="controls" autoplay="true" loop="true">新标日第11课</audio>
</div>

或者采用插件 hexo-tag-aplayer

1
2
{% aplayer title author url [picture_url, narrow, autoplay, width:xxx, lrc:xxx] %}
{% aplayer "新标日" "第11课" "11.mp3" "timg.jpg" %}

        

插入视频

1
<video src="got.mp4" controls="controls">冰与火之歌</video>

Create a new post

1
$ hexo new "My New Post"

Run server

1
$ hexo server

Generate static files

1
$ hexo generate

Deploy to remote sites

1
$ hexo deploy

html synchronizer

fetch remote webpage(including image file) and save to hexo post.

1
2
3
$ npm install hexo-html-syncer --save
# for example:
$ hexo syncer http://mp.weixin.qq.com/s/Tp4W-_0MXMvN5Tw3jlrtLg

auto-category

Automatically add front-matter categories to Hexo article according to the article file directory.

1
$ npm install hexo-auto-category --save
1
2
3
auto_category:
enable: true
depth: