npm install -g hexo-cli
$ hexo init <folder> # Hexo 将会在指定文件夹中新建所需要的文件
$ cd <folder>
$ npm install
我只改了title和author,url
hexo new "post title with whitespace" # 新建一篇文章
hexo generate # 生成静态文件
hexo server # 启动服务器
hexo deploy # 部署网站
创建github仓库
打开github,新建一个repository,名称是username.github.io
安装 hexo-deployer-git
npm install hexo-deployer-git --save
修改配置 _config.yml
deploy:
type: git
repo: <repository url> #https://bitbucket.org/JohnSmith/johnsmith.bitbucket.io
branch: [branch]
部署
hexo deploy
我选择的是 gstyle
toc:true
active_nav: false
在想要显示的摘要之后添加 <!-- more -->
手机扫一扫
移动阅读更方便
你可能感兴趣的文章