Build a personal blog with Hexo + Github

First, preparation

  • Install the nodeNodejs.org/en/download…
  • Install git git-scm.com/downloads
  • Install hexo NPM install hexo-cli -g
  • Create a github account and create a project (the account name at ⚠️ is your project name, for example: my account is cc and the project name is cc.github.io.git)

Two, Hexo is going to perform

  1. Build the project

    $hexo init < project name > $cd< project name >$NPM installCopy the code

  2. Start the project

    $ hexo sCopy the code
  3. Modify configuration _config.yml

    // Change the title# SiteTitle: Wang Xinyue's blog subtitle: Front-end process // modify the upload address# Deployment
    ## Docs: https://hexo.io/docs/deployment.html
    
    
    deploy:
      type: git
      repo: https://github.com/cc/cc.github.io.git
      branch: master
    Copy the code
  4. Modify source/_posts/hello-world.md and you get the following page




3. Hexo has reached the battlefield

  1. Install a hot update

    $ npm install hexo-browsersync --saveCopy the code

  2. Install Git support and upload

    $ npm install hexo-deployer-git --saveCopy the code

  3. Hexo should reach the battlefield

    $hexo g // Package $hexo d // upload to GithubCopy the code

  4. Enter url to view

https://cc.github.io.git (cc is your github username)

Four, get a skin sou

The yilia theme is recommended here

  1. Download the command

    $ cd ./themes/
    $ git clone https://github.com/JoeyBling/hexo-theme-yilia-plus.git ./yilia-plusCopy the code

  2. Modifying a Configuration File

    # Extensions
    ## Plugins: https://hexo.io/plugins/
    ## Themes: https://hexo.io/themes/
    theme: yilia-plusCopy the code
  3. Rebuild and restart

    $hexo g // Pack $hexo S // restart $hexo clean // Re-hexo g $hexo d // upload to Github if not in effectCopy the code



If you want other themes you can download them at hexo. IO /themes/

Wang Xinyue’s blog

Chatter about configuration changes