git安装hexo博客.md

MD文档是什么?

readme文件,这个有点类似于html语言。

    #: 一级标题
    ##: 
    ###
    ####
    #####
    ######
    -: 相当于li
复制代码

git安装hexo博客

1.github创建一个远程仓库

2.安装hexo工具

npm install hexo -g

3.测试是否安装成功

hexo -v

4.设置npm镜像源

npm config set registry registry.npm.taobao.org/

5.hexo下载blog

hexo init

6.安装依赖

npm install

7.安装hexo-deployer-git

npm install hexo-deployer-git --save

8.上传代码

8.1 配置

1)_config.yml文件 deploy: type: git repository: [email protected]:hjyl-cheng/myblog.git branch: gh-pages 2)SSH 无密码上传

  1. ssh-keygen, 直接将这个文件的目录添加到path中去。
  2. ssh-keygen -t rsa
  3. 将公钥上传到github上 3)hexo上传 hexo d g 4)修改代码或者配置 修改 root的配置 hexo clean hexo d g

9.打开页面

在github中切换到gh-pages这个分支,去setting里面,ghpages,找到地址打开即可!!!

你可能感兴趣的:(git,运维)