Skip to content

Commit

Permalink
Move files to root
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Feb 25, 2020
1 parent d8b5057 commit 952b9ff
Show file tree
Hide file tree
Showing 538 changed files with 9,263 additions and 9,301 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Thanks for opening a PR!

The docs cover several versions of `react-navigation`, and in some cases there are several files (for version 1, version 2 and etc.) that all describe a single page of the docs (eg. "Getting Started").

Please make sure that the edit you're making in `docs/file-you-edited.md` is also included in the file for the correct version, eg. `website/versioned_docs/version-3.x/file-you-edited.md` for version 3. If such file doesn't exist, please create it. :+1:
Please make sure that the edit you're making in `docs/file-you-edited.md` is also included in the file for the correct version, eg. `/versioned_docs/version-3.x/file-you-edited.md` for version 3. If such file doesn't exist, please create it. :+1:
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ jobs:
- name: Install dependencies
run: |
yarn --cwd website --frozen-lockfile
yarn --frozen-lockfile
- name: Sync with crowdin
env:
CROWDIN_DOCUSAURUS_PROJECT_ID: react-navigation
CROWDIN_DOCUSAURUS_API_KEY: ${{ secrets.CROWDIN_DOCUSAURUS_API_KEY }}
run: |
yarn --cwd website crowdin-upload
yarn --cwd website crowdin-download
yarn crowdin-upload
yarn crowdin-download
- name: Publish to Github pages
env:
Expand All @@ -57,4 +57,4 @@ jobs:
git config --global user.email "$GITHUB_EMAIL"
git config --global user.name "$GITHUB_ACTOR"
echo "machine github.com login $GIT_USER password $GITHUB_TOKEN" > ~/.netrc
yarn --cwd website publish-gh-pages
yarn deploy
11 changes: 5 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
node_modules
.DS_Store
.docusaurus
website/translated_docs
website/build/
website/node_modules
website/.docusaurus

website/i18n/*
!website/i18n/en.json
build/
translated_docs/

i18n/*
!i18n/en.json
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,30 @@ Want to help improve the documentation? That would be so very much appreciated.
### Run it locally

1. Clone the repository
2. `cd` into the `website` directory.
3. Run `yarn` (or `npm install`)
4. `yarn start`
2. Run `yarn` (or `npm install`)
3. `yarn start`

### Make changes

* The `docs` directory contains the markdown files used to generate the website. Change them and refresh the page when running the documentation locally and you will see the changes reflected.
* If you want to add a new page, you need to add it to [sidebars.json](https://github.com/react-navigation/react-navigation.github.io/blob/source/website/sidebars.json) and then restart the server.
* If you want to add a new page, you need to add it to [sidebars.json](https://github.com/react-navigation/react-navigation.github.io/blob/source/sidebars.json) and then restart the server.

## Things you need to be a collaborator to do

### Download the latest translations

- Configure `CROWDIN_DOCUSAURUS_PROJECT_ID` and `CROWDIN_DOCUSAURUS_API_KEY` environment variables (ask @brentvatne if you need access).
- `cd website` and run `yarn crowdin-upload` and then `yarn crowdin-download`
- Run `yarn crowdin-upload` and then `yarn crowdin-download`

### Deploy it

*Before deploying, be sure to download the latest translations!*

Only collaborators on this repository can deploy. `cd` into the website directory and run the following command from the `source` branch:
Only collaborators on this repository can deploy. Run the following command from the `source` branch:

```bash
GIT_USER=your_github_username \
STABLE_RELEASE=true \
GIT_USER=<Your GitHub username> \
CURRENT_BRANCH=source \
USE_SSH=true \
yarn run publish-gh-pages
yarn deploy
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
12 changes: 6 additions & 6 deletions crowdin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ preserve_hierarchy: true
files:
-
source: '/docs/*.md'
translation: '/website/translated_docs/%locale%/%original_file_name%'
translation: '/translated_docs/%locale%/%original_file_name%'
languages_mapping: &anchor
locale:
'zh-CN': 'zh-Hans'
-
source: '/website/i18n/en.json'
translation: '/website/i18n/%locale%.json'
source: '/i18n/en.json'
translation: '/i18n/%locale%.json'
languages_mapping: *anchor
-
source: '/website/versioned_docs/**/*.md'
translation: '/website/translated_docs/%locale%/**/%original_file_name%'
languages_mapping: *anchor
source: '/versioned_docs/**/*.md'
translation: '/translated_docs/%locale%/**/%original_file_name%'
languages_mapping: *anchor
Loading

0 comments on commit 952b9ff

Please sign in to comment.