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

相关文章
相关标签/搜索