Hexo操作指南-(命令)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/linton1/article/details/90139247

Hexo命令说明:

    Hexo官方文档:https://hexo.io/zh-cn/docs

hexo init # 新建一个网站
hexo new "文章名"  #新建文章
hexo new  page "页面名" #新建页面


hexo clean # 清除缓存文件(db.json和已生成的静态文件,尤其是更换主题后)


hexo g # 生成静态文件
hexo s # 启动hexo  (上述两个指令需要在博客根目录下执行)


hexo d  # 部署到GitHub上(前提是已经添加SSH Key,设置好账户信息)

添加主题:

    安装主题(yilia主题)

hexo clean
git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia   

    启动主题

    找到目录下的_config.yml 文件,打开找到 theme:属性并设置为yilia

    更新主题

cd themes/yilia
git pull
hexo g
hexo s

    此时刷新http://localhost:4000/页面就能看到新的主题了.

    其他页面关于命令的笔记:

    1.https://segmentfault.com/a/1190000002632530#articleHeader0

    2.https://blog.csdn.net/qq_26975307/article/details/62447489

猜你喜欢

转载自blog.csdn.net/linton1/article/details/90139247