Hexo introduced earlier this static blog system with you, powerful, can basically meet the various needs of the blog. Today, I'll tell you about a good static blog system, and that is Hugo.
Hugo is implemented by the Go language static website generator. Simple, easy to use, efficient, scalable, rapid deployment. Hugo and hexo similar, only need to remember a few simple commands, you can generate static blog. In addition, Hugo theme template than hexo, great to meet the needs of the party's skin.
Here's a brief look at this start of the static blog system
Download Hugo
To https://github.com/spf13/hugo/releases download the corresponding operating system version, Windows has, for example, download the following file
Adding Environment Variables
Extracting file copy hugo.exe path environment variable added to the Path, the steps of FIG.
Create a site
Run the following commands in the command line
hugo new site /path/to/site
Executing the site will create a directory in your path to fill, execute the command to enter the site directory
cd /path/to/site
Site directory structure is as follows
▸ archetypes/
▸ content/
▸ layouts/
▸ static/
config.toml
Creating Articles
Run the following command will produce a file in the content directory about.md
hugo new about.md
Follows
+++
date = "2015-10-25T08:36:54-07:00"
draft = true
title = "about"
+++
正文内容
Installation skin
The official address choose a favorite skin, or search again on GitHub.
For example, like this skin hyde, find his GitHub link https://github.com/spf13/hyde.git , create a themes directory in the root directory, execute the following command
cd themes
git clone https://github.com/spf13/hyde.git
Run Hugo
Run the following commands to specify hyde theme running, open the browser address http: // localhost: 1313 to see results
hugo server --theme=hyde --buildDrafts
deploy
Need to deploy to GitHub repository such as Git, you need to execute the following command
hugo --theme=hyde --baseUrl="http://coderzh.github.io/"
BaseUrl here is that you turn on GitHub Pages service addresses After executing generate public directory, enter the directory initialize the local warehouse, to submit to a remote repository (refer to previous Git a lot of trouble? Once you master these orders, relaxed the code is submitted to a remote repository )
A few simple steps, your static blog basically completed, follow-up is to write articles and adjust the details of the subject matter according to their needs.