Skip to content

Commit c664c0a

Browse files
committed
initial commit, add doc framework
0 parents  commit c664c0a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1977
-0
lines changed

.bookignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/config/
2+
gulpfile.js
3+
.markdownlint.json
4+
package.json
5+
.gitignore
6+
.bookignore
7+
/README.md
8+
/zh/CONTRIBUTING.md
9+
*.xlsx
10+
*.orig
11+
*.less
12+
*.ai
13+
.travis.yml
14+
deploy.sh
15+
serve.sh
16+
serve_daemon.sh
17+

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
npm-debug.log
2+
.DS_Store
3+
node_modules/
4+
output/
5+
.vscode/
6+
_book/
7+
*.epub
8+
*.mobi
9+
serve.tmp
10+
*-lock.json

.markdownlint.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"fenced-code-language": false,
3+
"ol-prefix": false,
4+
"line-length": false
5+
}

.travis.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
language: node_js
2+
3+
node_js:
4+
- "8"
5+
6+
# 缓存依赖
7+
cache:
8+
directories:
9+
- $HOME/.npm
10+
11+
before_install:
12+
- export TZ='Asia/Shanghai' # 更改时区
13+
14+
# 依赖安装
15+
install:
16+
- npm install gitbook-cli -g
17+
# 安装 gitbook 插件
18+
- gitbook install
19+
20+
# 构建脚本
21+
script:
22+
# 自定义输出目录 gitbook build src dest
23+
- gitbook build . ./build
24+
25+
# 分支白名单
26+
branches:
27+
only:
28+
- master # 只对 master 分支进行构建
29+
- dev
30+
- /v*.*/
31+
32+
# # GitHub Pages 部署
33+
# deploy:
34+
# provider: pages
35+
# skip_cleanup: true
36+
# # 在项目仪表盘的 Settings -> Environment Variables 中配置
37+
# github_token: $GITHUB_TOKEN
38+
# # 将 build 目录下的内容推送到默认的 gh-pages 分支上,并不会连带 build/zh 目录一起
39+
# local_dir: build/zh
40+
# #fqdn: $CUSTOM_DOMAIN
41+
# name: $GIT_NAME
42+
# email: $GIT_EMAIL
43+
# on:
44+
# branch: master
45+
46+
# 不使用travis的github pages构建功能,自定义脚本
47+
after_success:
48+
- bash ./deploy.sh

CNAME

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
maixpy.sipeed.com

LANGS.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- [English](/en)
2+
- [中文](/zh)

README.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Maixduino
2+
==========
3+
4+
Arduino port for Maix series board( k210 )
5+
6+
7+
8+
9+
10+
## Build Doc
11+
12+
13+
This documentation site is powered by GitBook. You can check out the online version here.
14+
15+
You need Node.js and npm to be able to build the site.
16+
17+
To install gitbook:
18+
19+
```
20+
npm install gitbook-cli -g
21+
```
22+
23+
Get Doc source code:
24+
```
25+
sudo apt install git
26+
git clone https://github.com/sipeed/Maixduino_DOC.git
27+
```
28+
29+
Install gitbook plugins:
30+
31+
```
32+
cd MaixPy_DOC
33+
gitbook install
34+
```
35+
36+
Serve as a website:
37+
38+
```
39+
chmod +x serve.sh
40+
./serve.sh
41+
```
42+
43+
Then visit http://localhost:4000
44+
45+

assets/BiT.png

510 KB
Loading

assets/Dan_Dock.png

384 KB
Loading

assets/Go.jpg

142 KB
Loading

assets/Go_Key_Down.png

129 KB
Loading

assets/M1_Dan.png

159 KB
Loading

assets/M1_Dan2.jpg

348 KB
Loading

assets/M1_pin.png

887 KB
Loading

assets/TF.png

1.65 MB
Loading

assets/arduino.png

44.6 KB
Loading

assets/arduino_board.png

128 KB
Loading

assets/arduino_settings.png

89.7 KB
Loading

assets/binocular.png

73.4 KB
Loading

assets/canaan-banner.jpg

170 KB
Loading

assets/css/custom_theme.css

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
.languages{
3+
margin-top: 50px;
4+
}
5+
6+
.languages a{
7+
color: green;
8+
font-size: 18px;
9+
}

assets/favicon.ico

4.19 KB
Binary file not shown.

assets/icon_sipeed.png

3.93 KB
Loading

assets/icon_sipeed2.png

53.5 KB
Loading

assets/k210-front-background.jpg

52.8 KB
Loading

assets/mic_array.png

61.8 KB
Loading

assets/type_c.png

141 KB
Loading

assets/win10_add_env_path.png

210 KB
Loading

assets/win10_edit_env.png

8.67 KB
Loading

assets/win10_search.png

5.07 KB
Loading

assets/win10_search_env.png

7.46 KB
Loading

book.json

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"title": "Maixduino DOC",
3+
"description": "Maixduino documentation",
4+
"author":"sipeed",
5+
"plugins": [
6+
"my-toolbar",
7+
"-lunr",
8+
"-search",
9+
"search-title",
10+
"anchor-navigation-ex",
11+
"anchorjs",
12+
"sharing",
13+
"splitter",
14+
"edit-link",
15+
"ga",
16+
"expandable-chapters-small@git+https://github.com/sipeed/gitbook-plugin-expandable-chapters-small.git"
17+
],
18+
"styles": {
19+
"website": "./styles/website.css"
20+
},
21+
"pluginsConfig": {
22+
"github": {
23+
"url": "https://github.com/sipeed/Maixduino"
24+
},
25+
"my-toolbar": {
26+
"buttons": [
27+
{
28+
"label": "Github",
29+
"text":" ",
30+
"icon": "fa fa-github",
31+
"position": "left",
32+
"target": "_blank",
33+
"url": "https://github.com/sipeed/Maixduino"
34+
}
35+
]
36+
},
37+
"search": {
38+
"maxIndexSize": 1000000000
39+
},
40+
41+
"lunr": {
42+
"maxIndexSize": 1000000000
43+
},
44+
"edit-link": {
45+
"base": "https://github.com/sipeed/Maixduino_DOC/blob/master",
46+
"label": ""
47+
},
48+
"sharing": {
49+
"douban": false,
50+
"facebook": true,
51+
"google": true,
52+
"hatenaBookmark": false,
53+
"instapaper": false,
54+
"line": false,
55+
"linkedin": false,
56+
"messenger": false,
57+
"pocket": false,
58+
"qq": false,
59+
"qzone": false,
60+
"stumbleupon": false,
61+
"twitter": true,
62+
"viber": false,
63+
"vk": false,
64+
"weibo": true,
65+
"whatsapp": false,
66+
"all": [
67+
"weibo",
68+
"facebook",
69+
"google",
70+
"twitter",
71+
"vk"
72+
]
73+
},
74+
"anchor-navigation-ex": {
75+
"associatedWithSummary": false,
76+
"showLevel": true,
77+
"multipleH1": false,
78+
"mode": "float",
79+
"pageTop": {
80+
"showLevelIcon": true,
81+
"level1Icon": "fa fa-angle-double-right",
82+
"level2Icon": "fa fa-angle-double-right",
83+
"level3Icon": "fa fa-angle-double-right"
84+
}
85+
},
86+
"ga": {
87+
"token": "UA-119047820-3"
88+
}
89+
}
90+
}

deploy.sh

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#!/bin/bash
2+
3+
set -o errexit -o nounset
4+
5+
rev=$(git rev-parse --short HEAD)
6+
BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
7+
echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, BRANCH=$BRANCH"
8+
curr_branch=$TRAVIS_BRANCH
9+
10+
cp -f index.html build/index.html
11+
cp -f assets/favicon.ico build/gitbook/images/favicon.ico
12+
cp -f assets/icon_sipeed.png build/gitbook/images/apple-touch-icon-precomposed-152.png
13+
14+
git clone -b gh-pages https://github.com/sipeed/Maixduino_DOC.git ./old
15+
rm -rf ./old/.git/
16+
echo "current build branch: --$curr_branch--"
17+
if [[ "$curr_branch" == "master" ]]; then
18+
echo "master"
19+
if [[ -d './old/dev' ]]; then
20+
echo "copy dev"
21+
cp -r ./old/dev ./build/
22+
fi
23+
cd ./old
24+
v_folder=`find ./ -maxdepth 1 -name 'v*.*'`
25+
echo "version folder:$v_folder"
26+
if [[ "x$v_folder" != "x" ]]; then
27+
echo "copy version folder"
28+
cp -r $v_folder ../build/
29+
fi
30+
cd ..
31+
elif [[ "$curr_branch" == "dev" ]]; then
32+
echo "dev"
33+
rm -rf ./old/dev
34+
mkdir ./old/dev
35+
cp -r ./build/* ./old/dev
36+
rm -rf ./build
37+
mv ./old ./build
38+
else
39+
echo "not master or dev"
40+
rm -rf ./old/$curr_branch
41+
mkdir ./old/$curr_branch
42+
cp -r ./build/* ./old/$curr_branch
43+
rm -rf ./build
44+
mv ./old ./build
45+
fi
46+
47+
cd build
48+
49+
git init
50+
51+
git config user.name $GIT_NAME
52+
53+
git config user.email $GIT_EMAIL
54+
55+
git remote add upstream "https://$GITHUB_TOKEN@github.com/sipeed/Maixduino_DOC.git"
56+
57+
# comment below because we don't need history of gh-pages, and use git push --force to cover history
58+
# git fetch upstream
59+
60+
# git reset upstream/gh-pages
61+
62+
# echo "gprs.ai-thinker.com" > CNAME
63+
64+
git add -A
65+
66+
git commit -m "rebuild pages at ${rev}"
67+
68+
git push upstream HEAD:gh-pages --force
69+

en/README.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Maixduino Documentation
2+
======
3+
4+
<div class="title_pic">
5+
<img src="../assets/arduino.png" height="60"> <img src="../assets/icon_sipeed2.png" height="60">
6+
</div>
7+
8+
9+
10+
## What is Maixduino
11+
12+
Let the Maix series of development boards (k210 chips) support the Arduino IDE and libraries, making it easy to use a large number of existing open source Arduino libraries for rapid development and prototyping
13+
14+

en/SUMMARY.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Summary
2+
=====
3+
4+
## Introduction
5+
6+
- [Introduction](README.md)
7+
8+
## Hardware
9+
10+
- [K210](hardware/k210.md)
11+
- [Module](hardware/module.md)
12+
- [Sipeed M1](hardware/m1.md)
13+
- [Board](hardware/board.md)
14+
- [Dan Dock](hardware/dan_dock.md)
15+
- [BiT](hardware/bit.md)
16+
- [Go](hardware/go.md)
17+
- [Peripheral Modules](hardware/peripheral_modules.md)
18+
- [Microphone array](hardware/mic_array.md)
19+
- [Binocular camera](hardware/binocular.md)
20+
- [LCD Module](hardware/lcd.md)
21+
22+
## Prepare
23+
24+
- [Get Hardware](get_started/get_hardware.md)
25+
- [Install](get_started/install.md)
26+
27+
28+
29+
30+
31+

0 commit comments

Comments
 (0)