This commit is contained in:
xugaoyi 2019-12-01 14:59:15 +08:00
parent 45e71c2b81
commit 50618d23e4
23 changed files with 1561 additions and 24 deletions

View File

@ -1,27 +1,27 @@
var nav = require('./config/nav.js');
var sidebar = require('./config/sidebar.json');
var sidebar = require('./config/sidebar.js');
module.exports = {
title: 'Evan 博客', // 标题
title: 'Evan Blog', // 标题
description: 'Evan Blog 个人博客基于vuepress构建专注前端学习与总结', // 描述,以 <meta> 标签渲染到当前页面的 HTML 中
// process.env.VUEPRESS_BASE 在package.json生成
base: process.env.VUEPRESS_BASE || '/', // 基础路径,默认'/',如果放到github pages要改成仓库名
head: [ // 注入到当前页面<head> 中的标签,格式[tagName, { attrName: attrValue }, innerHTML?]
['link', { rel: 'icon', href: '/img/logo.jpg' }] //favicons资源放在public文件夹
['link', { rel: 'icon', href: '/img/logo.png' }] //favicons资源放在public文件夹
],
markdown: {
lineNumbers: true // 代码行号
},
plugins: ['@vuepress/back-to-top','@vuepress/medium-zoom'], // 插件
themeConfig: { // 主题配置
logo: '/img/logo.jpg', // 导航栏logo
logo: '/img/logo.png', // 导航栏logo
nav: nav,
repo: 'xugaoyi/evanblog', // 导航栏生成Github链接
editLinks: true, // 编辑链接
editLinkText: '在 Github 上编辑此页',
// editLinks: true, // 编辑链接
// editLinkText: '在 Github 上编辑此页',
lastUpdated: '上次更新', // 上次更新时间,及前缀文字 string | boolean
// displayAllHeaders: true // 默认值false
// sidebar: 'auto', //自动侧边栏
sidebar: sidebar,
sidebar: 'auto', //自动侧边栏
//sidebar: sidebar,
},
// locales: {
// // 键名是该语言所属的子路径

View File

@ -14,11 +14,9 @@ module.exports = [
{text: 'python', link: '/python/'}
]
},
{text: '其他', items: [
{text: 'git使用文档', link: '/other/'},
{text: 'github使用技巧', link: '/other/'},
{text: 'markdown使用教程', link: '/other/'},
{text: '学习网站分享', link: '/other/'}
]},
{text: 'git使用文档', link: '/other/git'},
{text: 'github使用技巧', link: '/other/github'},
{text: 'markdown使用教程', link: '/other/markdown'},
{text: '学习网站分享', link: '/other/study'},
{text: '关于我',link: '/about/'}
]

View File

@ -0,0 +1 @@
module.exports = {}

View File

@ -1 +0,0 @@
{"/article_child/":["","rules","shizi","star"],"/article_tech/":[""],"/article_self/":[""],"/child/":["","code"],"/code/":["","other"],"/about/":[""],"/":[""]}

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -117,6 +117,7 @@ export default {
.image_title {
width: 14rem;
height: 10rem;
border-radius: 15px;
}
h2 {

View File

@ -0,0 +1,11 @@
## 关于我
男程序员喜欢唱、跳、rap、篮球写程序。
## :email: 联系
- **Github**: <https://github.com/xugaoyi>
- **Email**: <a href="mailto:894072666@qq.com">894072666@qq.com</a>
- **QQ**: 8940726696

401
docs/other/git.md Normal file
View File

@ -0,0 +1,401 @@
## Git使用文档
### 安装
官网下载:<https://git-scm.com/downloads> 下载完成后使用默认进行安装。
安装完成后,在开始菜单里找到 `Git` -> `Git Bash`蹦出一个类似命令行窗口的东西就说明Git安装成功
还需要最后一步设置,在命令行输入:
```bash
git config --global user.name "Your Name"
git config --global user.email "email@example.com"
```
因为Git是分布式版本控制系统所以每个机器都必须自报家门你的名字和Email地址。
### 创建版本库(仓库)
```bash
# 创建仓库
mkdir <仓库name>
# 进入仓库
cd <仓库name>
# 此命令用于显示当前目录
pwd
# 把当前目录初始化成Git仓库
git init
```
> 也不一定必须在空目录下创建Git仓库选择一个已经有东西的目录直接`git init`也是可以的。
### 添加文件到仓库
在仓库目录下放入文件,如新建一个`test.txt`文件,然后使用`git add test.txt`命令告诉Git把文件添加到缓存区然后使用`git commit -m "提交描述"`告诉Git把文件提交到仓库。
```bash
# 添加指定文件或文件夹到缓存区,文件需添加后缀
git add <文件或文件夹name> # 单个文件
git add <文件或文件夹name> <文件或文件夹name> # 多个文件
# 或 全部文件同时添加到缓存区
git add .
# 把文件从缓存区提交至仓库
git commit -m "提交描述"
```
##### 提交描述规范
在提交代码时输入清晰的说明有利于版本管理,建议搭配如下关键字编写提交描述
```bash
# 新建(add)
# 删除(rm)
# 更新(update)
# 改动(change)
# 实现
# 发布
# 修复
...
```
### 版本管理
##### 提交修改
如修改`test.txt`的内容后,运行`git status`命令看看被修改的文件,然后再使用`git add test.txt`、
`git commit -m "修改描述"`把修改后的文件提交到仓库,提交后可再次使用`git status`查看当前状态。
```bash
# 显示 新增/删除/被改动等 的文件
git status
```
##### 查看版本记录
```bash
# 查看版本记录
git log # 显示版本号、提交时间等信息
```
> 也可使用可视化工具查看Git版本历史
> 在仓库目录右键 > `Git BUI Here`
##### 回退版本
首先Git必须知道当前版本是哪个版本在Git中用`HEAD`表示当前版本也就是最新的提交1094adb...注意我的提交ID和你的肯定不一样上一个版本就是`HEAD^`,上上一个版本就是`HEAD^^`当然往上100个版本写100个^比较容易数不过来,所以写成`HEAD~100`。
```bash
# 回退到上一个版本
$ git reset --hard HEAD^
```
此时查看`git log`记录发现,原来最新的版本已经没有了,想回到原来最新的版本怎么办?这就需要知道最新的版本的版本号
``` bash
# 跳转到指定版本
git reset --hard <版本号前几位>
```
但是不知道版本号怎么办Git提供了一个命令`git reflog`用来记录你的每一次命令
```bash
git reflog
```
##### 撤销修改
<https://www.liaoxuefeng.com/wiki/896043488029600/897889638509536>
##### 删除文件
https://www.liaoxuefeng.com/wiki/896043488029600/900002180232448
### 远程仓库
##### SSH验证
使本机能关联远程仓库首次需要SSH验证
* 第1步创建`SSH Key`。在用户主C:\Users\dell目录下看看有没有.ssh目录
如果有,再看看这个目录下有没有`id_rsa`和`id_rsa.pub`这两个文件,如果已经有了,可直接跳到下一步。
如果没有打开ShellWindows下打开Git Bash创建`SSH Key`
```bash
# 创建SSH Key
ssh-keygen -t rsa -C "邮件地址"
```
* 第2步登陆GitHub右上角头像 > settings > SSH and GPG keys >Add SSH Key在key的文本框里粘贴`id_rsa.pub`文件的内容
##### 关联远程仓库
SSH验证完成后在github创建仓库创建仓库时记得取消 `Initialize this repository with a README`的勾选,然后在本地命令:
```bash
# 关联远程仓库仓库名一般使用origin
git remote add <仓库名> <远程仓库地址>
# 示例
git remote add origin git@github.com:xugaoyi/test.git
```
下一步,就可以把本地库的所有内容推送到远程库上
```bash
# 把文件推送到远程仓库
git push -u <仓库名> <分支名>
# 示例
git push -u origin master
```
由于远程库是空的,我们第一次推送`master`分支时,加上了`-u`参数Git不但会把本地的`master`分支内容推送的远程新的`master`分支,还会把本地的`master`分支和远程的`master`分支关联起来,在以后的推送或者拉取时就可以简化命令。
> 前提是目录已经`git init`初始化成仓库,并且`git status`状态是没有改动的,如果有改动则先`git add .`添加至缓存区,`git commit -m '提交描述'`提交至仓库,然后执行上面命令。
>
> 如创建仓库时勾选了 `Initialize this repository with a README` 则需先拉取`README.md`文件到本地仓库`git pull`
>
> 可关联多个远程仓库,注意给不同的远程仓库取不一样的名称,提交是分别按名称提交到不一样的远程仓库。
```bash
# 简化的推送命令
git push
```
##### 查看远程仓库
```bash
# 查看远程仓库
git remote -v
```
##### 删除远程仓库
```bash
# 删除远程仓库
git remote rm <仓库名>
```
##### 从远程库克隆项目
```bash
# 从远程库克隆项目
git clone <仓库地址>
```
###### 克隆指定分支
```bash
# 克隆指定分支
git clone -b <分支名> <仓库地址>
```
### 分支管理
##### 创建分支
```bash
# 创建分支
git checkout -b <分支名>
```
##### 查看分支
```bash
# 查看分支
git branch
```
> 查看分支时,在分支前带 * 号的表示当前的分支
##### 切换分支
```bash
# 切换分支
git checkout <分支名>
```
##### 合并分支
```bash
# 合并分支
git merge <分支名>
```
> 用于合并指定分支到当前分支。
##### 删除分支
```bash
# 删除分支
git branch -d <分支名>
```
##### 修改分支名
```bash
# 修改分支名
git branch -m <原分支名> <新分支名>
```
### 帮助命令
如对命令不清楚时,可使用`git help`命令显示出git命令介绍。
```bash
# 帮助命令
git help
```
```bash
$ git help
usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
These are common Git commands used in various situations:
start a working area (see also: git help tutorial)
clone Clone a repository into a new directory
init Create an empty Git repository or reinitialize an existing one
work on the current change (see also: git help everyday)
add Add file contents to the index
mv Move or rename a file, a directory, or a symlink
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
examine the history and state (see also: git help revisions)
bisect Use binary search to find the commit that introduced a bug
grep Print lines matching a pattern
log Show commit logs
show Show various types of objects
status Show the working tree status
grow, mark and tweak your common history
branch List, create, or delete branches
checkout Switch branches or restore working tree files
commit Record changes to the repository
diff Show changes between commits, commit and working tree, etc
merge Join two or more development histories together
rebase Reapply commits on top of another base tip
tag Create, list, delete or verify a tag object signed with GPG
collaborate (see also: git help workflows)
fetch Download objects and refs from another repository
pull Fetch from and integrate with another repository or a local branch
push Update remote refs along with associated objects
'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
```
翻译工具翻译中文
```bash
$ git help
使用git [--version] [--help] [-C <path>] [-c <name>=<value>]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
这些是在各种情况下使用的通用Git命令
start a working area (参见命令: git help tutorial)
clone 将存储库克隆到新目录中
init 创建一个空的Git存储库或重新初始化一个现有的存储库
work on the current change (参见命令: git help everyday)
add 将文件内容添加到索引中
mv 移动或重命名文件、目录或符号链接
reset 将当前磁头重置为指定状态
rm 从工作树和索引中删除文件
examine the history and state (参见命令: git help revisions)
bisect 使用二分查找查找引入错误的提交
grep 打印与模式匹配的行
log 显示提交日志
show 显示各种类型的对象
status 显示工作树状态
grow, mark and tweak your common history
branch 列出、创建或删除分支
checkout 切换分支或还原工作树文件
commit 记录对存储库的更改
diff 显示提交、提交和工作树等之间的更改
merge 将两个或多个开发历史连接在一起
rebase 在另一个基本提示之上重新应用提交
tag 创建、列表、删除或验证用GPG签名的标记对象
collaborate (参见命令: git help workflows)
fetch 从另一个存储库下载对象和引用
pull 从另一个存储库或本地分支获取并与之集成
push 更新远程引用和相关对象
'git help -a' 和 'git help -g' 列出可用的子命令和一些概念指导。
命令'git help <command>' 或 'git help <concept>' 查看特定子命令或概念.
```
### 参考文档
<https://www.liaoxuefeng.com/wiki/896043488029600>

56
docs/other/github.md Normal file
View File

@ -0,0 +1,56 @@
## Github高级搜索技巧
`in:name <关键字>`
仓库名称带关键字查询
`in:description <关键字>`
仓库描述带关键字查询
`in:readme <关键字>`
README文件带关键字查询
`stars(fork): >(=) <数字> <关键字>`
star或fork数大于(或等于)指定数字的带关键字查询
`stars(fork): 10..20 <关键词>`
star或fork数在10到20之间的带关键字查询
`size:>=5000 <关键词>`
限定仓库大于等于5000K的带关键字查询
`pushed(created):>2019-11-15 <关键字>`
更新 或 创建 日期在2019年11月16日之后的带关键字查询
`license:apache-2.0 <关键字>`
LICENSE为apache-2.0的带关键字查询
`language:java <关键词>`
仓库语言为Java的带关键字查询
`user:<用户名>`
查询某个用户的项目
`org:<组织名>`
查询某个组织的项目
***以上查询条件可组合使用,空格隔开**
```sh
# 示例1搜索仓库名包含javascript并且stars数大于1000的项目
in:name javascript stars:>1000
# 示例2搜索描述中包含"小程序"并且fork大于100并且最近更新时间在2019-11-15之后的并且使用开发语言为vue的项目
in:description 小程序 fork:>100 pushed:>2019-11-15 language:vue
```
***或使用高级搜索页搜索:**
<https://github.com/search/advanced>

1025
docs/other/markdown.md Normal file

File diff suppressed because it is too large Load Diff

BIN
docs/other/md-img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
docs/other/md-img/test.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1,2 @@
# test

33
docs/other/study.md Normal file
View File

@ -0,0 +1,33 @@
## 文档类
| 名称 | 网址 | 描述 |
| ----------------- | ---------------------------------------------------- | ---------- |
| MDN | 中文:<https://developer.mozilla.org/zh-CN/docs/Web> | |
| 菜鸟教程 | <https://www.runoob.com/> | |
| JavaScript教程 | <https://wangdoc.com/javascript/> | 阮一峰编写 |
| ECMAScript 6 入门 | <http://es6.ruanyifeng.com/> | 阮一峰编写 |
| ECMA官网 | <https://www.ecma-international.org/> | |
## 视频类
| 名称 | 网址 | 描述 |
| ------------ | ----------------------------- | ------------------------------------------------------- |
| 慕课网 | <https://www.imooc.com/> | |
| 妙味课堂 | <https://www.miaov.com/> | |
| 中国大学MOOC | <https://www.icourse163.org/> | 涵盖计算机、外语、心理学等专业**免费**课程 |
| bilibili | <https://www.bilibili.com/> | 你没看错正是B站上面也有一些可供学习的**免费**视频哦 |
| youtube | <http://www.youtube.com/> | 外网 |
| egghead | <http://egghead.io> | 外网 |
## 社区类
| 名称 | 网址 | 描述 |
| -------------- | ---------------------------- | ---------------------------- |
| Github | <https://github.com/> | 大名鼎鼎的程序员同性交友社区 |
| 掘金 | <https://juejin.im/> | |
| 简书 | <https://www.jianshu.com/> | |
| 思否 | <https://segmentfault.com/> | |
| stack overflow | <https://stackoverflow.com/> | 外网 |

View File

@ -1,21 +1,31 @@
---
home: true
# heroImage: /img/logo.jpg
heroText: Evan博客
tagline: web前端工程师热衷于学习与总结
heroImage: /img/logo.png
heroText: Evan Blog
tagline: web前端工程师热衷于学习与总结
features:
- title: 前端
details: 前端技术
details: web前端开发相关技术
url: /web/
imgname: /img/article.jpg
imgname: /img/web.jpg
- title: python
details: 人生苦短我学python
details: 人生苦短我学python
url: /python/
imgname: /img/code.jpg
imgname: /img/python.jpg
- title: 关于我
details: 前端界的小学生
details: 前端界的小学生
url: /about/
imgname: /img/code.jpg
imgname: /img/about.jpg
footer: Copyright © 2019-present evanblog
---
## :email: 联系
- **Github**: <https://github.com/xugaoyi>
- **Email**: <a href="mailto:894072666@qq.com">894072666@qq.com</a>
- **QQ**: 8940726696