Skip to content

Commit 5ac2ebf

Browse files
committed
learn-React 文档
1 parent b3dccee commit 5ac2ebf

File tree

11 files changed

+9454
-2
lines changed

11 files changed

+9454
-2
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
docs/.vuepress/dist

README.md

+25-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,25 @@
1-
# learn-React
2-
learn-React 文档
1+
# learn-React 文档
2+
3+
> 点击勘误[issues](https://github.com/webVueBlog/learn-React/issues),哪吒感谢大家的阅读
4+
5+
## 学前必读
6+
7+
哪吒希望能为开发人员提供最大程度的愉悦开发体验。提供便捷的阅读文档,帮助前端开发小团体高效率的工作进度,并维护本站learn-React 文档。
8+
9+
## 感谢指正
10+
11+
指正不胜感激,无以回报。
12+
13+
## 声明
14+
15+
学习文档,仅适合本人食用!!!
16+
17+
## 勘误及提问
18+
19+
如果有疑问或者发现错误,可以在相应的 issues 进行提问或勘误。
20+
21+
如果喜欢或者有所启发,欢迎 star,对作者也是一种鼓励。
22+
23+
## License
24+
25+
所有文章采用[知识共享署名-非商业性使用-相同方式共享 3.0 中国大陆许可协议](http://creativecommons.org/licenses/by-nc-sa/3.0/cn/)进行许可。

deploy.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# 确保脚本抛出遇到的错误
2+
set -e
3+
4+
# 打包生成静态文件
5+
yarn docs:build
6+
printf "打包成功\n"
7+
8+
# 进入打包好的文件夹
9+
cd docs/.vuepress/dist
10+
11+
# 写入域名 EOF是结束符标识
12+
# cat > CNAME << EOF
13+
# 1024bibi.com
14+
# EOF
15+
16+
# 静态页面上传
17+
# 创建git的本地仓库,提交修改
18+
git init
19+
# ??
20+
git checkout -b dist
21+
git add -A
22+
git commit -m 'deploy'
23+
printf "本地提交成功\n"
24+
# 覆盖式地将本地仓库发布至github,因为发布不需要保留历史记录
25+
# 格式为:git push -f [email protected]:'用户名'/'仓库名'.git master
26+
git push -f https://github.com/webVueBlog/learn-React.git dist
27+
28+
printf "dist目录上传成功\n"

docs/.vuepress/config.js

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
module.exports = {
2+
title: 'learn-React 文档',
3+
description: 'learn-React 文档',
4+
base: '/learn-React/',
5+
theme: 'reco',
6+
head: [
7+
['meta', { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no' }]
8+
],
9+
plugins: [
10+
[
11+
'dynamic-title',
12+
{
13+
showIcon: '/favicon.ico',
14+
showText: '(/≧▽≦/)咦!又好了!',
15+
hideIcon: '/failure.ico',
16+
hideText: '(●—●)喔哟,崩溃啦!',
17+
recoverTime: 2000,
18+
},
19+
],
20+
['vuepress-plugin-code-copy', true]
21+
],
22+
locales: {
23+
'/': {
24+
lang: 'zh-CN'
25+
}
26+
},
27+
themeConfig: {
28+
lastUpdated: '上次更新',
29+
subSidebar: 'auto',
30+
nav: [{
31+
text: '首页',
32+
link: '/'
33+
},
34+
{
35+
text: '星星♥',
36+
link: 'https://github.com/webVueBlog/learn-React'
37+
},
38+
{
39+
text: '哪吒的博客',
40+
items: [{
41+
text: 'Github',
42+
link: 'https://github.com/webVueBlog'
43+
},
44+
{
45+
text: '博客',
46+
link: 'https://1024bibi.com'
47+
}
48+
]
49+
}
50+
],
51+
sidebar: [{
52+
title: '欢迎学习',
53+
path: '/',
54+
collapsable: false, // 不折叠
55+
children: [{
56+
title: "学前必读",
57+
path: "/"
58+
}]
59+
},
60+
{
61+
title: "基础学习",
62+
path: '/handbook/install',
63+
// collapsable: false, // 不折叠
64+
children: [{
65+
title: "React 安装",
66+
path: "/handbook/install"
67+
}
68+
],
69+
},
70+
]
71+
}
72+
}

docs/.vuepress/styles/index.styl

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// 通过检查,查看元素样式声明
2+
.dark .content__default code {
3+
background-color: rgba(58,58,92,0.7);
4+
color: #fff;
5+
}
6+
7+
.page .page-title {
8+
display: none;
9+
}

docs/.vuepress/styles/palette.styl

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$accentColor = #3178c6

docs/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
> 点击勘误[issues](https://github.com/webVueBlog/learn-React/issues),哪吒感谢大家的阅读
2+
3+
## 学前必读
4+
5+
哪吒希望能为开发人员提供最大程度的愉悦开发体验。提供便捷的阅读文档,帮助前端开发小团体高效率的工作进度,并维护本站learn-React 文档。
6+
7+
## 留言评论
8+
9+
因为目前没有留言功能,请拉到文章底部,跳转到对应的 Github Issues,在 Issues 留言回复。
10+
11+
<img src="./assets/20211213143926.png" style="display: flex; margin: auto; width: 100%;"/>
12+
13+
## 感谢指正
14+
15+
指正不胜感激,无以回报。
16+
17+
## 声明
18+
19+
学习文档,仅适合本人食用!!!

docs/assets/20211213143926.png

40.8 KB
Loading

docs/handbook/install.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
> 点击勘误[issues](https://github.com/webVueBlog/learn-React/issues),哪吒感谢大家的阅读
2+

package.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"devDependencies": {
3+
"vuepress": "^1.9.5",
4+
"vuepress-plugin-dynamic-title": "^1.0.0"
5+
},
6+
"scripts": {
7+
"docs:dev": "vuepress dev docs",
8+
"docs:build": "vuepress build docs"
9+
},
10+
"dependencies": {
11+
"@vuepress-reco/vuepress-plugin-back-to-top": "^1.6.0",
12+
"@vuepress-reco/vuepress-plugin-screenfull": "^1.0.1",
13+
"@vuepress/plugin-medium-zoom": "^1.9.5",
14+
"vuepress-plugin-code-copy": "^1.0.6",
15+
"vuepress-theme-reco": "^1.6.10"
16+
}
17+
}

0 commit comments

Comments
 (0)