採用Hexo 搭建Team Blog,hexo搭建teamblog

來源:互聯網
上載者:User

採用Hexo 搭建Team Blog,hexo搭建teamblog

採用Hexo 搭建Team Blog



首先你要會使用Git 已經GitHub,然後讓我們瞭解下什麼是靜態Blog



靜態部落格是指 不需要資料庫驅動,擁有豐富模板,通過模板標記語言產生簡單html css靜態內容形式的部落格。


常用的靜態Blog產生器有如下幾種:

jekyllhttp://jekyllcn.com/  ruby

octopresshttp://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 外掛程式

已經整合的





聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.