Personal blog to build a full record (Hexo, Github)

The process of building a small distortion of the main draw blog
blog theme airclod

Hexo, Github station records

1. Prepare

Github account

Register Login Github

Creating Repository, Repository Name is YourName.github.io (YourName: is the registered user name)

Install Git
Install Node.js

Download Node.Js

Window users when using the installer to install. Install, check Add to PATH option

Installation Hexo

Open CMD, execute the command: npm install -g hexo-cli

2. Set

Initialization Hexo command: hexo init blog

Initialization successful upgrade: INFO Start blogging with Hexo!

After the initialization is successful, sourcethere will be directory hello world.mdfile, simply execute the following command:

Build command: hexo generate

Start the local server: hexo server

Enter the browser http://localhost:4000/can see the pages and templates

SSH settings: ssh-keygen -t rsa -C "Github的注册邮箱地址"

Set SSH command to get information after the execution: Your public key has been saved in /c/Users/user/.ssh/id_rsa.pub.

Find the file, copy all the key information, log on to the Github , New SSH Key, the Title = Blog, Key = key information

3. Configure blog

First, I changed the theme, download a theme: git clone https://github.com/aircloud/hexo-theme-aircloud.git aircloud

To download the theme on the next themes

-config.yml reference configuration file: file address

Search function is enabled, install plug-ins: npm i hexo-generator-search --save

Tags on pages and pages, sourcefolder build tagsfolders and aboutfolders:hexo new page tags/about

tagsFolder index.mdwrites:

---
layout: "tags"
title: "Tags"
---

aboutFolder index.mdis a file format supported markdown, you need to add at the beginning:

---
layout: "about"
title: "About"
date: 2016-04-21 04:48:33
comments: true
---

Cancel appreciation function: 删除掉赞赏部分

4. posted to Github

Creating article: hexo new "newFile"

clear cache : hexo clean

Generate static files: hexo generate

Deploying publish: hexo deploy

If after performing hexo deploy, error deployer not found appears: github error, execute:npm install hexo-deployer-git --save

5. Hexo command

init

hexo init [folder]

Create a website, if not set folder, Hexo default in the current folder Create site

new

hexo new "post title with whitespace"

New article

generate

hexo generate

Generate static files

Shorthand: hexo g

publish

hexo publish [layout] <filename>

Published draft

server

hexo server

Start the server, the default access address the case: http://localhost:4000/

deploy

hexo deploy

Deployment site

Shorthand: hexo d

render

hexo render <file1> [file2] ...

Render files

migrate

hexo migrate <type>

Migrate content from another blog system

clean

hexo clean

Clear cache files (db.json) and generated static files (public)

In some cases (especially after changing theme), if you find your site in no way changes take effect, you may need to run the command

list

hexo list <type>

Listed site data

version

hexo version

Display Hexo version

6. Summary

Has completed building a blog, build a complete show results , if there is a problem of public concern number can ask me, the last paragraph and the king of mutual encouragement:每个人都有觉得自己不够好,羡慕别人闪闪发光的时候,但其实大多人都是普通的。不要沮丧,不必惊慌,做努力爬的蜗牛或坚持飞的笨鸟,在最平凡的生活里,谦卑和努力

I will write articles every day learning road record, and I myself put together some learning materials, currently all on my public number "SmallBird technology sharing," Join us to learn together exchanges, and respond to 'share' will be a big data, cloud computing resources surprises waiting for you ~

Guess you like

Origin www.cnblogs.com/SmallBird-Nest/p/11535430.html