Skip to content

Commit ffe741c

Browse files
Drakeoonlukewalczakandrewtsar0wyamankatby
authored
docs: migrate to Docusaurus (#3614)
Co-authored-by: lukewalczak <[email protected]> Co-authored-by: Andriy Tsaryov <[email protected]> Co-authored-by: Yaman KATBY <[email protected]>
1 parent 1074ab2 commit ffe741c

File tree

986 files changed

+32591
-6434
lines changed

Some content is hidden

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

986 files changed

+32591
-6434
lines changed

.circleci/config.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2.1
33
executors:
44
default:
55
docker:
6-
- image: circleci/node:16
6+
- image: cimg/node:16.18.0
77
working_directory: ~/react-native-paper
88

99
commands:
@@ -104,10 +104,11 @@ jobs:
104104
- run:
105105
name: Build docs
106106
command: |
107+
export DOCUSAURUS_BASE_URL="/output/job/$CIRCLE_WORKFLOW_JOB_ID/artifacts/$CIRCLE_NODE_INDEX/docs/"
107108
cd docs && yarn build && cd ..
108109
bash .circleci/comment-artifacts.sh
109110
- store_artifacts:
110-
path: docs/dist
111+
path: docs/build
111112
destination: docs
112113

113114
deploy-docs:
@@ -148,4 +149,5 @@ workflows:
148149
- deploy-docs:
149150
filters:
150151
branches:
151-
only: main
152+
only:
153+
- main

.circleci/deploy-docs.sh

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
99
SOURCE_BRANCH="main"
1010
TARGET_BRANCH="gh-pages"
1111

12-
cd $DIR/../docs
12+
git checkout $SOURCE_BRANCH
13+
14+
cd $DIR/..
15+
16+
# Install React Native Paper dependencies for examples
17+
yarn
18+
19+
cd docs
1320

1421
# Save some useful information
1522
REPO=`git config remote.origin.url`
@@ -25,34 +32,19 @@ cd ..
2532

2633
# Clean existing dist/ contents
2734
rm -rf dist/**/* || :
28-
rm -f dist/*.{html,css,js,json,map} || :
35+
rm -f dist/*.{html,css,js,json,map,xml} || :
2936
rmdir dist/* || :
3037

3138
# Run our build script.
3239
yarn
3340
yarn build
3441

35-
# Build the docs for 1.0
36-
git checkout 1.0
37-
yarn
38-
yarn build
42+
# Move the built docs to cloned `gh-pages` directory
43+
cp -R build/. dist
3944

40-
# Build the docs for 2.0
41-
git checkout 2.0
42-
yarn
43-
yarn build
44-
45-
# Build the docs for 3.0
46-
git checkout 3.0
47-
yarn
48-
yarn build
49-
50-
# Build the docs for 4.0
51-
git checkout 4.0
52-
yarn
53-
yarn build
45+
rm -rf build
5446

55-
# Push the built docs
47+
# Change directory to the one using `gh-pages` branch
5648
cd dist
5749

5850
# Configure git.

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ node_modules/
22
flow-typed/
33
coverage/
44
docs/dist/
5+
docs/build/
6+
docs/public/
7+
docs/static/
58
web-build/
69
testSetup.js
710

docs/.babelrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/.eslintrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"extends": "../.eslintrc",
3+
4+
"settings": {
5+
"import/core-modules": ["react-native-paper"]
6+
},
7+
8+
"rules": {
9+
"react/prop-types": "off",
10+
"import/no-unresolved": [
11+
2,
12+
{"ignore": ["^@docusaurus"]}
13+
]
14+
}
15+
}

docs/.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,27 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*
21+
22+
# component-docs-plugin
23+
docs/components
24+
25+
# legacy
126
dist/
227
.linaria-cache/

docs/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ yarn
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
Using SSH:
30+
31+
```
32+
$ USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```
38+
$ GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
-62.2 KB
Binary file not shown.

docs/assets/showcase/kurogahome.png

-248 KB
Binary file not shown.
-579 KB
Binary file not shown.

0 commit comments

Comments
 (0)