hexo注意事项和常用命令
我的博客网站:
Gitee:一丈青 (gitee.io)
GitHub:一丈青 (1zhangqing.github.io)
-
自己手写front-matter就是写—然后回车就能出现写front-matter的块来
参数 描述 默认值 layout布局 config.default_layouttitle标题 文章的文件名 date建立日期 文件建立日期 updated更新日期 文件更新日期 comments开启文章的评论功能 true tags标签(不适用于分页) categories分类(不适用于分页) permalink覆盖文章网址 excerptPage excerpt in plain text. Use this plugin to format the text disableNunjucksDisable rendering of Nunjucks tag {{ }}/{% %}and tag plugins when enabledlangSet the language to override auto-detection Inherited from _config.yml -
hexo init [folder]初始化一个博客
-
hexo new [layout] <title>新建一篇文章,在BLOG文件下下git bush或者在BLOG/suorce/_post文件夹下git bush后输入该命令
-
hexo generate生成静态页面
可简写为
hexo g -
hexo publish [layout] <filename>发表草稿
-
hexo server启动服务器
可简写为
hexo s -
hexo deploy部署网站
可简写为
hexo d -
hexo clean清除缓存文件 (
db.json) 和已生成的静态文件 (public)。在某些情况(尤其是更换主题后),如果发现您对站点的更改无论如何也不生效,您可能需要运行该命令。
-
hexo --draft显示
source/_drafts文件夹中的草稿文章 -
写一篇博客并上传的步骤流程
在BLOG文件目录下git bush here后输入hexo new [layout] 文件名新建一篇博客
在博客中用markdown语法写完博客后
在BLOG文件目录下git bush here
在命令终端hexo clean清除缓存,然后hexo g生成静态页面,然后hexo s启动本地服务器在本地预览结果(可省略),最后hexo d部署hexo g -d这是直接生成静态页面并上传的简化命令
最后
以上就是机智高跟鞋最近收集整理的关于hexo注意事项和常用命令hexo注意事项和常用命令的全部内容,更多相关hexo注意事项和常用命令hexo注意事项和常用命令内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复