savian's website


  • Home

  • Archives

  • Tags

HEXO 博客搭建

Posted on 2016-11-10

个人网站终于建起来了~撒花!趟过了好多坑,写下来,以后也好给自己和别人参考。相关博客参考
hexo http://www.jianshu.com/p/465830080ea9
git下载https://git-for-windows.github.io/
廖雪峰http://www.liaoxuefeng.com/
搭建http://blog.csdn.net/jzooo/article/details/46781805
l另一篇更详细的教程http://www.jianshu.com/p/1c98aed8d92e#
主题http://theme-next.iissnan.com/getting-started.html
域名http://www.isetsuna.com/hexo/domain-dns/
Your Order Number is: 2691747824
域名解析https://www.freehao123.com/freenom-gq/
图床http://yotuku.cn/

1.在 Git Bash 中我们执行下面这一句(这是一整句的):

alias cnpm=”npm –registry=https://registry.npm.taobao.org --cache=$HOME/.npm/.cache/cnpm --disturl=https://npm.taobao.org/dist --userconfig=$HOME/.cnpmrc”

现在验证下是否可以使用淘宝的 cnpm 命令:cnpm info express
2.
继续在 Git Bash 中输入:
cnpm install hexo -server –save
cnpm install hexo-deployer-git –save

3.

  • 先清除掉已经生成的旧文件:hexo clean
  • 再生成一次静态文件:hexo generate
  • 在本地预览下:hexo server
  • 现在用浏览器访问:http://localhost:4000/
  • 本地没问题之后,Ctrl + C 停掉本地预览,使用部署命令部署到 Github 上:hexo deploy,有弹出下面提示框,请输入:yes
  • 访问 https://savian66.github.io/
  • 新建文章hexo new page “pageName”//新建文章,位于目录/blog/source/_posts下 编辑文章
  • 新建页面hexo generate
  • 生成静态页面至public目录hexo server
  • 开启预览访问端口(默认端口4000,’ctrl + c’关闭server)
  • 将.deploy目录部署到GitHub hexo deploy
Read more »

Hello World

Posted on 2016-11-10

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

12
savianzhao

savianzhao

12 posts
3 tags
© 2017 savianzhao
Powered by Hexo
Theme - NexT.Mist