-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
56 changed files
with
37,979 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
title: ESLint | ||
date: 2019-12-01 21:30:49 | ||
tags: VSCode | ||
categories: 技术文档 | ||
keywords: | ||
description: | ||
top_img: | ||
comments: | ||
cover: | ||
--- | ||
|
||
# vscode中的vscode的配置代码 | ||
|
||
```json | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
{ | ||
"language": "vue", | ||
"autoFix": true | ||
} | ||
], | ||
"eslint.autoFixOnSave": true, | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
--- | ||
title: Hexo博客搭建流程 | ||
date: 2019-09-19 20:00:00 | ||
tags: Hexo | ||
categories: 技术文档 | ||
keywords: 博客搭建 | ||
description: 博客搭建步骤 | ||
top_img: | ||
comments: | ||
cover: https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/Hexo-Built-in-Tag-Plugins-COVER.png | ||
--- | ||
|
||
## 安装 hexo | ||
|
||
```shell | ||
npm install hexo -g | ||
``` | ||
|
||
## hexo 常用指令 | ||
|
||
```shell | ||
hexo clean # 清空hexo,主要删除Hexo根目录下的public文件夹 | ||
hexo g # 重新成功public文件夹内容 | ||
hexo s # 启动本地hexo服务 | ||
hexo d # 发布到远程仓库 | ||
``` | ||
|
||
## 初始化 hexo | ||
|
||
```shell | ||
hexo init | ||
``` | ||
|
||
## 安装 deploter-git 插件 | ||
|
||
```shell | ||
npm install hexo-deployer-git | ||
``` | ||
|
||
## Hexo 发布到 github 的时候,会丢失 reanme 和 CNAME | ||
|
||
```shell | ||
npm install hexo-generator-cname | ||
``` | ||
|
||
## 安装主题 Butterfly | ||
|
||
> [官方网站](https://docs.jerryc.me/) | ||
在博客根目录安装主题 | ||
|
||
```shell | ||
git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/Butterfly | ||
``` | ||
|
||
安装 cheerio | ||
|
||
```bash | ||
npm install [email protected] --save | ||
``` | ||
|
||
安装渲染器 | ||
|
||
```shell | ||
npm install hexo-renderer-pug hexo-renderer-stylus | ||
``` | ||
|
||
修改 hexo 配置文件`_config.yml`,把主题改为`Butterfly` | ||
|
||
```xml | ||
theme: Butterfly | ||
``` | ||
|
||
其余配置请参考主题的[配置文档](https://docs.jerryc.me/) | ||
|
||
## 常用插件 | ||
|
||
### 本地搜索 | ||
|
||
安装插件 | ||
|
||
```shell | ||
npm install hexo-generator-search --save | ||
``` | ||
|
||
此`_config.yml`配置插件 | ||
|
||
```yml | ||
search: | ||
path: search.xml | ||
field: post | ||
content: true | ||
``` | ||
### 文章顶置 | ||
```bash | ||
npm uninstall hexo-generator-index --save | ||
npm install hexo-generator-index-pin-top --save | ||
``` | ||
|
||
```md | ||
--- | ||
top: True | ||
--- | ||
``` | ||
|
||
### note 标签 | ||
|
||
```html | ||
<div class="note default"><p>default</p></div> | ||
``` | ||
|
||
<div class="note default"><p>default</p></div> | ||
```html | ||
<div class="note primary"><p>primary</p></div> | ||
``` | ||
<div class="note primary"><p>primary</p></div> | ||
```html | ||
<div class="note success"><p>success</p></div> | ||
``` | ||
<div class="note success"><p>success</p></div> | ||
```html | ||
<div class="note info"><p>info</p></div> | ||
``` | ||
<div class="note info"><p>info</p></div> | ||
```html | ||
<div class="note warning"><p>warning</p></div> | ||
``` | ||
<div class="note warning"><p>warning</p></div> | ||
```html | ||
<div class="note danger"><p>danger</p></div> | ||
``` | ||
<div class="note danger"><p>danger</p></div> | ||
| ||
|
||
### RSS | ||
|
||
安装插件 | ||
|
||
```shell | ||
npm install hexo-generator-feed --save | ||
``` | ||
|
||
### 添加萌宠 | ||
|
||
```shell | ||
npm install hexo-helper-live2d --save | ||
# 参考文章:https://vonsdite.cn/posts/fbd1f97f.html | ||
``` | ||
|
||
### 安装 sitmap 插件 | ||
|
||
```shell | ||
npm install hexo-generator-sitemap --save | ||
npm install hexo-generator-baidu-sitemap --save | ||
``` | ||
|
||
## 卸载 hexo | ||
|
||
```shell | ||
npm uninstall hexo | ||
``` |
Oops, something went wrong.