此博文做为 Hexo 写作的 Cookbook,记录写作中常用内容,方便参考引用。
命令
部署(Deployment)
1 | hexo clean |
运行(Run)
1 | hexo s |
发布(Push)
1 | hexo publish [layout] <title> |
写作(Writting)
-
1
2
3// hexo new [layout] <tittle | file name>
hexo new post hello-world // path source/_posts
hexo new draft hello-world // path source/_drafts
标签插件(Tag Plugins)
Note
1 | {% note class_name %} Content (md partial supported) {% endnote %} |
其中,class_name 可以是以下列表中的一个值:
- default
- primary
- success
- info
- warning
- danger
1 | {% note warning 不要处理我的文章 %} |
如果你不想你的文章被处理,你可以将 Front-Matter 中的layout: 设为 false 。
突破容器宽度限时的图片
1 | <!-- HTML方式: 直接在 Markdown 文件中编写 HTML 来调用 --> |
引用(quote)
引用书上的句子
1 | {% blockquote David Levithan, Wide Awake %} |
Do not just seek happiness for yourself. Seek happiness for all. Through kindness. Through mercy.
引用网络上的文章
1 | {% blockquote Seth Godin http://sethgodin.typepad.com/seths_blog/2009/07/welcome-to-island-marketing.html Welcome to Island Marketing %} |
Every interaction is both precious and an opportunity to delight.