第一步:下载node
D:\my app\nodejs
第二步:github注册
->Zhang2002GZ.github.io(用户名.github.io)
第三步:下载git
git for windows->cmd+r: git(D:\my app\Git)
第四步:SHH配置
(1)git_bash打开:$ ssh-keygen -t rsa -C “2251787923@qq.com”->回车(4次)直至结束
记住这行Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa) 括号里面的地址是后面要用到的
(2)打开github->setting->SHH:title:Zhang2002GZ ;key:粘贴文本文档
user->zhangguozhi->.ssh->.pub
在github上建秘钥
第五步:hexo使用
->文档
npm install hexo-cli -g //安装
hexo init blog //初始化博客
cd blog
npm install
//hexo server
新建目录blog->cmd+r->D:->cd blog->npm install hexo-cli -g->hexo init myblog->cd myblog->npm install ->hexo s -p 4000
浏览器输入网址:localhost:4000
第六步:sublime安装
->将博客目录直接拖进->## hello hexo
PS:推荐直接在打开方式中选择记事本打开,在记事本里直接修改
第七步:hexo发布至github
hexo->文档->部署repo
sublime->_config.yml
1 | 开头: |
hexo->文档->部署
hexo g->npm install hexo-deployer-git --save->hexo d
1 | type: git |
hexo init( Start blogging with Hexo!)->静态生成本地的hexo页面hexo s(打开本地服务器:将http://localhost:4000可以看见博客;ctrl+c关闭服务器就看不见页面)
->npm install hexo-deployer-git --save->生成页面hexo g->将本地文件上传github hexo d
(error10054:这个保错就执行git config --global http.sslVerify “false”)
**!**登入页面弹窗只在第一次创建的时候出现
第八步:美化
git clone https://github.com/theme-nexmoe/hexo-theme-nexmoe.git themes/nexmoe
(git clone 改页面代码所在地址.git 存到themes目录下/新建的nexmoe)
sublime修改_config.yml:theme: nexmoe
也可以在release里下载压缩包将它解压到themes中
npm install --save hexo-renderer-pug
git clone https://github.com/liuyib/hexo-theme-stun.git themes/stun
theme: sbun
清理一下hexo clean ,生成一下 hexo g,hexo s(打开服务器),hexo d(上传)
其他
检查:
1 | node -v |
万能三件套:
1 | git config --global --unset http.proxy |
一些pure主题的配置
hexo-theme-pure/README.cn.md at master · cofess/hexo-theme-pure (github.com)
1 | 文章索引目录 |
相关视频
【2021最新版】保姆级Hexo+github搭建个人博客_哔哩哔哩_bilibili
Hexo博客开发之——WARN No layout index.html - 程序员大本营 (pianshen.com)
1 | Git 全局设置: |
一些符号的使用
1 | 加粗:**文字** |
> 文字
1
2
3
4
5
6
7
8
9
10
11
12
13
表格同一格里换行:文字<br/>
---
title: 基础知识1
categories:
- 智能车
tags:
- 笔记
toc: true
---
-空格:无序列表(下面那个点,回车会再有一个点)
---回车(下面那个分隔线)
1 | 表格同一格里换行:文字<br/> |
Markdown设置字体颜色
(2条消息) 【Markdown笔记】设置字体颜色_dadalaohua的博客-CSDN博客_markdown设置字体颜色