Hello Hexo

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.

Hexo 介绍

Hexo 是一个简单地、轻量地、基于Node的一个静态博客框架。通过Hexo我们可以快速创建自己的博客,仅需要几条命令就可以完成。

发布时,Hexo可以部署在自己的Node服务器上面,也可以部署github上面。对于个人用户来说,部署在github上好处颇多,不仅可以省去服务器的成本,还可以减少各种系统运维的麻烦事(系统管理、备份、网络)。所以,基于github的个人站点,正在开始流行起来….

Hexo的官方网站:http://hexo.io/ ,也是基于Github构建的网站。

Hexo安装

系统环境:

  • win7 64bit

  • node v0.10.5

  • npm 1.2.19

Hexo安装,要用全局安装,加-g参数。

1
c:\Users\ChangXiao>npm install -g hexo

查看hexo的版本

1
c:\Users\ChangXiao>hexo version

安装好后,我们就可以使用Hexo创建项目了。

1
c:\Users\ChangXiao>hexo init nodejs-hexo

进入目录cd nodejs-hexo,并启动Hexo服务器hexo server

这时端口4000被打开了,我们能过浏览器打开地址,http://localhost:4000/

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

参考资料:

Hexo在github上构建免费的Web应用

热评文章