关于笔记

本项目借鉴 Mrcode 笔记本 ,如有兴趣可以参考 这里 开始搭建

MarkDown

Markdown是一种可以使用普通文本编辑器编写的标记语言,通过简单的标记语法,它可以使普通文本内容具有一定的格式。
语法简单并且能有简洁美观的效果,非常适合程序员做笔记

手风琴

例:

title this is details

写法:
<details open>
<summary>title</summary>
this is details

</details>
1
2
3
4
5

vscode-paste-image

vscode 插件,粘贴图片非常方便:

持续集成

本文档采用 Travis 持续集成

  • .travis.yml 配置
language: node_js
sudo: required
node_js:
  - "lts/*"
cache:
  directories:
    - node_modules
script:
  - ./deploy.sh
branch: master
1
2
3
4
5
6
7
8
9
10
  • deploy.sh 配置
#!/usr/bin/env sh

# 确保脚本抛出遇到的错误
set -e

# 生成静态文件
npm run docs:build

# 进入生成的文件夹
cd docs/.vuepress/dist

# 如果是发布到自定义域名
echo 'note.zxc66.site' > CNAME

git init
git add -A
git commit -m 'deploy'

# 如果发布到 https://<USERNAME>.github.io
# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master

# 如果发布到 https://<USERNAME>.github.io/<REPO>
# git push -f git@github.com:superzxc1/note-book.git master:gh-pages

# 如果使用 travis 持续集成
git push -f https://${access_token}@github.com/superzxc1/note-book.git master:gh-pages

cd -
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

参考