Use GitHub, Hexo, multi-talk, Baidu statistics to build a personal blog guide under Mac

Source: Internet
Author: User
Tags generator

1. Pre-Preparation:

(1) Register your GitHub account

(2) Installing Xcode

(3) Installing node. js

2. Create repository:

(1) Open a GitHub profile and click the Create Warehouse button New repository

(2) For example, my account is cynthiawupore, then I create a warehouse name must be cynthiawupore. Github.io. Then click on the Create repository button below

(3) Click Create Reposotory, go to the following page, click on the settingsabove, drag to devolve, click Launch automatic page generator

(4) in the lower right corner of the

(5) Here Directly Publish page can be, do not choose the theme, because we will use Hexo theme to replace this.

(6) created successfully, you can visit your own website http://cynthiawupore.github.io/

3. Configure SSH Keys

(1) Enter this directory under the Iterm2 console, check the SSH key, if the prompt does not have the folder, the new, if no hint, the description has, then first backup, then new.

CD ~/.ssh
// Create a new backup directory
// Backup Files
" [email protected] " // Enter your own github mailbox and create a new SSH

The procedure for entering password verification appears

If the password is correct, it will appear:

// View the contents of the generated SSH file and copy

4. Associate the configured SSH and GitHub accounts:

(1) Add the newly copied SSH to the GitHub account's personal settings settings->ssh public keys-> New ssh key

(2) ->ssh public keys-> New SSH key

(3) Paste the contents of the SSH file just copied here

(4) After clicking the button Add SSH key

5. Test if SSH key is added successfully

  (1) Open the console

// back to the SSH storage directory

Ssh-agent-s

will appear

Continue command

The following prompt indicates that the add succeeded

And then we test it.

ssh-t [email protected]

I was denied access here.

And then I tried.

SSH-VT [email protected]

If you also encounter problems like mine, solution:

Vim ~/.ssh/config

and add it to the file.

Host github.com  Hostname ssh.github.com  443

Press ESC, and then enter: Wq to save and exit

It's time to test again.

ssh-t [email protected]

ok! above means that the SSH configuration is OK.

6. Configure Hexo

(1) After configuring SSH, we start to install Hexo.

// Global Installation Hexo or HEXO-CLI

(2) Check if the installation is successful and the version information appears

Hexo-v

(3) Feel free to create a new folder, such as Bloggithub

// Initialize Hexo

Upon completion

// Install the configuration file inside
// Sometimes it needs to be loaded again.
npm install hexo-generator-index --savenpm install hexo-generator-archive --savenpm install hexo-generator-category --savenpm install hexo-generator-tag --savenpm install hexo-server --savenpm install hexo-deployer-git --savenpm install [email protected] --savenpm install [email protected] --savenpm install [email protected] --savenpm install [email protected] --save
Hexo-G  // local View

This time it will automatically open the browser preview your blog, and then we release to GitHub on the completion of the Hexo configuration.

(4) Open the directory where you store your blog static files, here is Bloggithub, then open _config.yml, configure our own domain name

Deploy:  type:git  Repo:https://github.com/cynthiawupore/ Cynthiawupore.github.io.git  Branch:master
// Publish

Write it first. Then add the section of the new article and use it in conjunction with Webstrom

Use GitHub, Hexo, multi-talk, Baidu statistics to build a personal blog guide under Mac

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.