2019你還沒搭建我的博客嗎?進來看看

使用hexo+github搭建我的博客

1、準備工做

2、 hexo要上場表演啦

  1. 構建項目

    $ hexo init <項目名稱>
    $ cd <項目名稱>$ npm install複製代碼

  2. 啓動項目html

    $ hexo s複製代碼
  3. 修改配置_config.yml前端

    //修改標題# Site
    title: 王新月的博客
    subtitle: 前端歷程
    //修改上傳地址# Deployment
    ## Docs: https://hexo.io/docs/deployment.html
    
    
    deploy:
      type: git
      repo: https://github.com/cc/cc.github.io.git
      branch: master
    複製代碼
  4. 修改source/_posts/hello-world.md,你就獲得了下面的頁面node



3、 hexo已經到達戰場

  1. 裝個熱更新

    $ npm install hexo-browsersync --save複製代碼

  2. 裝個git 支持就能上傳了

    $ npm install hexo-deployer-git --save複製代碼

  3. hexo應到達戰場

    $ hexo g //打包
    
    $ hexo d //上傳到github 複製代碼

  4. 輸入網址查看

       https://cc.github.io.git  (cc是你到github用戶名)git

4、搞個皮膚sou

這裏推薦yilia主題github

  1. 下載命令

    $ cd ./themes/
    $ git clone https://github.com/JoeyBling/hexo-theme-yilia-plus.git ./yilia-plus複製代碼

  2. 修改配置文件npm

    # Extensions
    ## Plugins: https://hexo.io/plugins/
    ## Themes: https://hexo.io/themes/
    theme: yilia-plus複製代碼
  3. 從新構建並重啓bash

    $ hexo g //打包
    
    $ hexo s//重啓
    
    $ hexo clean //若是未生效後在從新hexo g
    $ hexo d //上傳到github 
    
    複製代碼


若是你想要其餘主題能夠在官方下載:hexo.io/themes/hexo

王新月的博客

嘰裏咕嚕改配置post

相關文章
相關標籤/搜索