Fork me on GitHub

hexo基本操作

创建文章

1
$ hexo new "My New Post"

More info: Writing

本地运行

1
$ hexo server

More info: Server

编译

1
$ hexo generate

More info: Generating

发布

1
$ hexo deploy

同步项目源文件到Github

1
2
3
4
5
6
7
8
9
// 添加源文件
git add .
// git提交
git commit -m ""
// 先拉原来Github分支上的源文件到本地,进行合并
// 分支名后面的“--allow-unrelated-histories”是为了弹出“fatal: refusing to merge unrelated histories.”的错误
git pull origin 分支名 --allow-unrelated-histories
// 比较解决前后版本冲突后,push源文件到Github的分支
git push origin 分支名
-------------本文结束感谢您的阅读-------------

本文标题:hexo基本操作

文章作者:huog

原始链接:https://fighting123.github.io/posts/3662755565.html

许可协议: 署名-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。