Hexo-Post操作

创建新post

$ hexo new [layout] <title>
  • layout可为post, page, draft等,其中draft可将编辑内容保存为草稿,具体用法可见 hexo-draft

  • title有空格带引号,无空格可不带

  • hexo new (post) 命令生成md文件于/source/_posts/文件夹下

Details in Writing

置顶post

不需要更换插件,参考hexo-generator-index 插件 issue

在要置顶的post中加入sticky字段即可,如sticky: 10

  • sticky取大于0的值即表示置顶,且值越大越靠前
  • 利用该方法置顶时会自动在标题左侧加上置顶符号