1: Register your GitHub account and create a new repository (the warehouse name must be "Your_user_name. Github.io")
2: Configure GitHub Ssh-key The general installation of GitHub will be configured first Ssh-key
3: Use NPM (First install Nodejs node: http://nodejs.org/) to install Hexo to global (for Hexo installation configuration process, please take the official Hexo "2" to the steps given) official address: https://hexo.io/
4: After all is configured, first right-click Git Bash in the folder where you want to store the project, then use git clone [email protected]:iifred/iifred.github.io.git (This is the address of your own new warehouse) to get the warehouse file
5: (Continue typing in the Git bash window above) $ hexo init (Hexo then automatically creates the files needed for the site in the destination folder. Then continue with the NPM install Node_modules installed in the directory. After the installation is complete, you can execute Hexo server to open the running project
Http://localhost:4000/hexo Server-p (port number) You can specify the port to run
6: After running OK locally we'll sync him to GitHub, first we enter (continue typing in the Git bash window above) Hexo generate after the command executes, a series of html,css and other files are generated in the D:\Hexo\public\ directory.
Hexo new "My new Post" generates a markdown file in the D:\Hexo\source\_posts directory: my-new-post.md
You can use an editor that supports markdown syntax (such as Sublime Text 2) to edit the file.
Before deploying to GitHub, you need to configure the _config.yml file, first find the following content
# deployment## Docs:http://hexo.io/docs/deployment.htmldeploy: type:
They are then modified to
# deployment## Docs:http://hexo.io/docs/deployment.htmldeploy: type:github repository:iifred/ Iifred.github.io.git Branch:master
Note that a space is required after the colon
After the configuration is complete we only need to execute these 3 commands to see the effect in http://iifred.github.io/(iifred own username)
Hexo Cleanhexo Generatehexo Deploy
Join you when performing a deploy without effect is estimated to be a version issue
You can first install a NPM installed Hexo-deployer-git--save
_config.yml file found Deploy:type:git
Note the format!!!
If not, then Baidu to own.
such as: http://www.v2ex.com/t/175940
You can use Hexo-version to view your version
Other more about Hexo set up the more exciting!!
Hexo build GitHub static blog (Windows)