You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update documentation formatting for consistency and clarity
* Update README to reflect TypeScript configuration files and correct Docusaurus link
* Fix HTML syntax in README for image tag in remark-snackplayer documentation
As a reminder, all contributors are expected to adhere to the [Code of Conduct](https://github.com/facebook/react-native-website/blob/main/CODE_OF_CONDUCT.md).
Copy file name to clipboardexpand all lines: README.md
+35-34
Original file line number
Diff line number
Diff line change
@@ -16,21 +16,21 @@ If you are looking for the source code of the [React Native Archive website](htt
16
16
17
17
### Prerequisites
18
18
19
-
1.[Git](https://git-scm.com/downloads).
20
-
1.[Node](https://nodejs.org/en/download/)_(version 12 or greater)_.
21
-
1.[Yarn](https://yarnpkg.com/lang/en/docs/install/)_(version 1.5 or greater)_.
22
-
1.A fork of the repo _(for any contributions)_.
23
-
1.A clone of the `react-native-website` repo.
19
+
1.[Git](https://git-scm.com/downloads).
20
+
1.[Node](https://nodejs.org/en/download/)_(version 12 or greater)_.
21
+
1.[Yarn](https://yarnpkg.com/lang/en/docs/install/)_(version 1.5 or greater)_.
22
+
1. A fork of the repo _(for any contributions)_.
23
+
1. A clone of the `react-native-website` repo.
24
24
25
25
### Installation
26
26
27
-
1.`cd react-native-website` to go into the project root.
28
-
1.Run `yarn` to install the website's workspace dependencies.
27
+
1.`cd react-native-website` to go into the project root.
28
+
1. Run `yarn` to install the website's workspace dependencies.
29
29
30
30
### Running locally
31
31
32
-
1.Run `yarn start` to start the development server _(powered by [Docusaurus](https://v2.docusaurus.io))_.
33
-
1.Open http://localhost:3000/ site in your favorite browser.
32
+
1. Run `yarn start` to start the development server _(powered by [Docusaurus](https://docusaurus.io))_.
33
+
1. Open <http://localhost:3000/> site in your favorite browser.
34
34
35
35
## 📖 Overview
36
36
@@ -84,12 +84,13 @@ react-native-website/
84
84
├── versioned_sidebars/
85
85
│ ├── [GENERATED VERSIONED SIDEBARS]
86
86
│ └── ...
87
-
├── docusaurus.config.js
87
+
├── docusaurus.config.ts
88
88
├── package.json
89
89
├── showcase.json
90
-
├── sidebars.json
91
-
├── sidebarsArchitecture.json
92
-
├── sidebarsContributing.json
90
+
├── sidebars.ts
91
+
├── sidebarsArchitecture.ts
92
+
├── sidebarsCommunity.ts
93
+
├── sidebarsContributing.ts
93
94
└── versions.json
94
95
```
95
96
@@ -99,11 +100,11 @@ As mentioned above, the `docs` folder contains the source files for docs from "G
99
100
The doc files for the "Architecture" and "Contribution" tabs are located inside `website` in the respective directories (unversioned/static docs).
100
101
In most cases, you will only want to edit the files within those directories.
101
102
102
-
If you're adding a new doc or you need to alter the order the docs appear in the sidebar, take a look at the `sidebars.json`, `sidebarsArchitecture.json` and `sidebarsContributing.json` files in the `website` directory. The sidebar files contain a list of document ids that should match those defined in the header metadata (aka frontmatter) of the docs markdown files.
103
+
If you're adding a new doc or you need to alter the order the docs appear in the sidebar, take a look at the `sidebars.ts`, `sidebarsArchitecture.ts` and `sidebarsContributing.ts` files in the `website` directory. The sidebar files contain a list of document ids that should match those defined in the header metadata (aka frontmatter) of the docs markdown files.
103
104
104
105
### Versioned docs
105
106
106
-
Part of the React Native website is versioned to allow users to go back and see the Guides or API reference documentation for any given release. A new version of the website is generally generated whenever there is a new React Native release. When this happens, any changes made to the `docs` and `website/sidebars.json` files will be copied over to the corresponding location within `website/versioned_docs` and `website/versioned_sidebars`.
107
+
Part of the React Native website is versioned to allow users to go back and see the Guides or API reference documentation for any given release. A new version of the website is generally generated whenever there is a new React Native release. When this happens, any changes made to the `docs` and `website/sidebars.ts` files will be copied over to the corresponding location within `website/versioned_docs` and `website/versioned_sidebars`.
107
108
108
109
> **_Note:_** Do not edit the auto-generated files within `versioned_docs` or `versioned_sidebars` unless you are sure it is necessary. Edits made to older versions will not be propagated to newer versions of the versioned docs.
109
110
@@ -119,13 +120,13 @@ This can be done by updating the `package.json` and configuration files in `scri
119
120
120
121
##### After Release
121
122
122
-
1.`cd react-native-website` to go into the project root.
123
-
1.`cd website` to go into the website portion of the project.
124
-
1.Run `yarn version:cut <newVersion>` where `<newVersion>` is the new version being released.
123
+
1.`cd react-native-website` to go into the project root.
124
+
1.`cd website` to go into the website portion of the project.
125
+
1. Run `yarn version:cut <newVersion>` where `<newVersion>` is the new version being released.
125
126
126
127
## 🔧 Website configuration
127
128
128
-
The main config file for the website can be found at `website/docusaurus.config.js`. This file tells [Docusaurus how to build the website](https://v2.docusaurus.io/docs/configuration). Edits to this file are rarely necessary.
129
+
The main config file for the website can be found at `website/docusaurus.config.ts`. This file tells [Docusaurus how to build the website](https://docusaurus.io/docs/configuration). Edits to this file are rarely necessary.
129
130
130
131
The `core` subdirectory contains JavaScript and React components that are the core part of the website.
131
132
@@ -139,21 +140,21 @@ The `showcase.json` file contains the list of users that are highlighted in the
139
140
140
141
### Create a branch
141
142
142
-
1.`git checkout main` from any folder in your local `react-native-website` repository.
143
-
1.`git pull origin main` to ensure you have the latest main code.
144
-
1.`git checkout -b the-name-of-my-branch` to create a branch.
143
+
1.`git checkout main` from any folder in your local `react-native-website` repository.
144
+
1.`git pull origin main` to ensure you have the latest main code.
145
+
1.`git checkout -b the-name-of-my-branch` to create a branch.
145
146
> replace `the-name-of-my-branch` with a suitable name, such as `update-animations-page`
146
147
147
148
### Make the change
148
149
149
-
1.Follow the "[Running locally](#running-locally)" instructions.
150
-
1.Save the files and check in the browser.
151
-
1.Some changes may require a server restart to generate new files. (Pages in `docs` always do!)
152
-
1.Edits to pages in `docs` will only be visible in the latest version of the documentation, called "Next", located under the `docs/next` path.
150
+
1. Follow the "[Running locally](#running-locally)" instructions.
151
+
1. Save the files and check in the browser.
152
+
1. Some changes may require a server restart to generate new files. (Pages in `docs` always do!)
153
+
1. Edits to pages in `docs` will only be visible in the latest version of the documentation, called "Next", located under the `docs/next` path.
153
154
154
-
Visit **http://localhost:3000/docs/next/YOUR-DOCS-PAGE** to see your work.
155
+
Visit **<http://localhost:3000/docs/next/YOUR-DOCS-PAGE>** to see your work.
155
156
156
-
> Visit http://localhost:3000/versions to see the list of all versions of the docs.
157
+
> Visit <http://localhost:3000/versions> to see the list of all versions of the docs.
157
158
158
159
### Test the change
159
160
@@ -164,13 +165,13 @@ If possible, test any visual changes in all latest versions of the following bro
164
165
165
166
### Push it
166
167
167
-
1.Run `yarn prettier` and `yarn language:lint` in `./website` directory to ensure your changes are consistent with other files in the repo.
168
-
1.`git add -A && git commit -m "My message"` to stage and commit your changes.
168
+
1. Run `yarn prettier` and `yarn language:lint` in `./website` directory to ensure your changes are consistent with other files in the repo.
169
+
1.`git add -A && git commit -m "My message"` to stage and commit your changes.
169
170
> replace `My message` with a commit message, such as `Fixed header logo on Android`
170
-
1.`git push my-fork-name the-name-of-my-branch`
171
-
1.Go to the [react-native-website repo](https://github.com/facebook/react-native-website) and you should see recently pushed branches.
172
-
1.Follow GitHub's instructions.
173
-
1.Describe briefly your changes (in case of visual changes, please include screenshots).
171
+
1.`git push my-fork-name the-name-of-my-branch`
172
+
1. Go to the [react-native-website repo](https://github.com/facebook/react-native-website) and you should see recently pushed branches.
173
+
1. Follow GitHub's instructions.
174
+
1. Describe briefly your changes (in case of visual changes, please include screenshots).
Copy file name to clipboardexpand all lines: scripts/lint-examples/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,6 @@
2
2
3
3
This script lints Snack player examples as if they were placed in a newly built react-native project. Changes to the examples made by linting will be patched back into the original document.
4
4
5
-
###Arguments
5
+
## Arguments
6
6
7
7
Command line arguments (e.g. `--fix`) are currently forwarded to ESLint.
0 commit comments