Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

一. Ahead

1.1 Install git(ubuntu)

1
$ sudo apt install git

1.2 Configuring git environmen

1
2
$ git config --global user.email “cwhong_top@163.com”
$ git config --global user.name “cwhongtop”

1.3 New SSH Keys

  • Check ssh keys

    1
    $ less ~/.ssh/id_rsa.pub
  • new ssh keys

    1
    $ ssh-keygen -t rsa -C cwhong_top@163.com
  • display ssh keys

    1
    $ less ~/.ssh/id_rsa.pub
  • Then add ssh keys to your github

    在github首页右上角点击头像,选择Settings,然后选择New SSH KEY,把上面一步id_rsa.pub文件的秘钥复制进去就好了。

1.4 Configuring git environmen in hexo’s config.yml

1
2
3
4
deploy:
type: git
repo: git@github.com:cwhongtop/cwhongtop.github.io.git
branch: master

二. Quick Start

2.1 Install hexo

1
$ npm install hexo -g

2.2 Create a new post

1
$ hexo new "My New Post"

More info: Writing

2.3 Run server

1
$ hexo server

More info: Server

2.4 Generate static files

1
$ hexo generate

More info: Generating

2.5 Deploy to remote sites

1
$ hexo deploy

More info: Deployment

最后更新: 2019年07月09日 18:51

原始链接: https://cwhong.top/2018/12/25/hello-world/

× Thank you~
打赏二维码