hello.
注意!所有的hexo命令要在建立的博客的文件夹下即:
hexo init 文件夹名
初始化hexo的文件夹下启动git bush输入命令
Hexo 常见命令hexo s
$ hexo s
启动服务器,用于预览主题
hexo s 是 hexo server 的缩写,命令效果一致;
预览的同时可以修改文章内容或者主题的代码,保存后刷新即可
对 Hexo 根目录 _config.yml 的修改,需要重启本地服务器后才能预览效果。hexo clean
$ hexo clean
清楚缓存文件db.json和已经生成的静态文件public
网站显示异常时可以试试该命令hexo g
$ hexo g
生成网站的静态文件到默认的设置文件public中
hexo g 是hexo generate的缩写
便于查看网站生成的静态文件或者手动部署网站
如果是自动部署,不需要先执行该命令hexo d
$ hexo d
自动生成网站静态文件,并部署到设定的仓库中
hexo d 是 hexo deploy 的缩写,效果一致hexo n page
$ hexo n page about
意思为新建一个about的页面,默认的链接地址为主页地址/about/
标题可以用中文,但是习惯使用英文
页面标题和文章一样可以随意修改
页面不会出现在首页文章列表和归档中,也不支持分类和标签
hexo n
$ hexo n "笔记01"
新建一篇标题为 笔记01 的文章
新建内容时标题可以写的简单些
hexo n 是 hexo new 的缩写。