采用Hexo 搭建Team Blog

采用Hexo 搭建Team Blog



首先你要会使用Git 已经GitHub,然后让我们了解下什么是静态Blog



静态博客是指 不需要数据库驱动,拥有丰富模板,通过模板标记语言生成简单html css静态内容形式的博客。


常用的静态Blog生成器有如下几种:

jekyll http://jekyllcn.com/  ruby

octopress http://octopress.org/

hexo  http://hexo.io/   nodejs

ghost  https://ghost.org/

Dropbox + MarkDown = Blog, FarBox!


GitHub 和 DigtalOcean 最近提供了一个优惠政策,所有有.edu 邮箱的都可以免费申请100美元,好机会不容错过,详情看博主的另外的帖子

http://blog.csdn.net/jackrex/article/details/40071353


采用的标记性语言 MarkDown 编写blog。

http://wowubuntu.com/markdown/

这里采用Hexo来生成静态Blog

Hexo

参考文档 http://hexo.io/docs/index.html


安装:


what’s npm


NPM nodejs packager manager  nodejs 包管理器


正式开始,生成Blog


接下来开始在Github建立个repo 仓库,名字命名为 teamname.github.com (team  是你团队名称)。















package.json  npm 配置文件





_config.yml  hexo 配置文件





hexo help 让我们看看hexo的常用命令



接下来开始生成我们的blog

hexo init

hexo g (generate)

hexo s (server)

it works !!


激动人心的时候可到了,赶快访问http://localhost:4000/





在_config.yml 配置好我们的github地址

hexo deploy 上传到我们的github 上


访问 http://alloyteammobile.github.io/

我擦,这什么情况?


网址解析要等大约半个小时,骚年等等吧。

更多主题


界面太丑了,来换换别的主题吧。

这里有更多地主题选择

https://github.com/tommy351/hexo/wiki/Themes

把需要的主题克隆到本地的themes中

修改 _config.yml  中的theme


让我们在一次激动人心的访问 http://localhost:4000/

这又是啥情况??


好吧,需要安装EJS解析模板


https://github.com/tommy351/hexo/releases/tag/2.6.0


执行如下命令



再次打开 http://localhost:4000/ 。 It Works!!!!



欣赏下主题

hexo clean
hexo generate
hexo deploy


























有的时候使用一些主题会遇到一些问题,比如:



YAML parser was changed in Hexo 2.8. You have to wrap strings like this with quotation marks.

archive_b: Archives: %s => archive_b: "Archives: %s"




Edit all of the yml file in the language folders of thirdparty theme , add quotation marks when there is a space between the values.





这里需要把所有模板中的archive_b: Archives: %s => archive_b: "Archives: %s"

加啥双引号,不然会解析错误。




好的Blog好的文章当然要和大家互动哈,集成我们的评论系统,Disqus 或者多说,我们暂时用多说吧。






具体使用参考官网文档很简单。

正式开始写Blog。




























hexo 插件


已经集成的


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值