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
Copy file name to clipboardExpand all lines: README.md
+17-16Lines changed: 17 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
# [reactnative.dev](https://reactnative.dev/)·[](LICENSE-docs)[](CONTRIBUTING.md) <ahref="https://twitter.com/intent/follow?screen_name=reactnative"><imgsrc="https://img.shields.io/twitter/follow/reactnative.svg?label=Follow%20@reactnative"alt="Follow @reactnative" /></a>
1
+
# [reactnative.dev](https://reactnative.dev/)·[](LICENSE-docs)[](CONTRIBUTING.md) <ahref="https://twitter.com/intent/follow?screen_name=reactnative"><imgsrc="https://img.shields.io/twitter/follow/reactnative.svg?label=Follow%20@reactnative"alt="Follow @reactnative on X" /></a> <ahref="https://bsky.app/profile/reactnative.dev"><imgsrc="https://img.shields.io/badge/Bluesky-0285FF?logo=bluesky&logoColor=fff"alt="Follow @reactnative.dev on Bluesky" /></a>
2
2
3
3
This repo contains the website configuration and documentation powering the [React Native website](https://reactnative.dev/).
4
4
5
-
If you are looking for the source code of the [React Native Archive website](https://archive.reactnative.dev/) select the [`archive`](https://github.com/facebook/react-native-website/tree/archive) branch.
5
+
> If you are looking for the source code of the [React Native Archive website](https://archive.reactnative.dev/) select the [`archive`](https://github.com/facebook/react-native-website/tree/archive) branch.
6
6
7
7
## Contents
8
8
@@ -17,18 +17,13 @@ If you are looking for the source code of the [React Native Archive website](htt
17
17
### Prerequisites
18
18
19
19
1.[Git](https://git-scm.com/downloads).
20
-
1.[Node](https://nodejs.org/en/download/)_(version 20 or greater)_.
1. A fork and clone of the `react-native-website` repo _(for any contributions)_.
24
23
25
24
### Installation
26
25
27
26
1.`cd react-native-website` to go into the project root.
28
-
1. Run `corepack enable` to enable Corepack.
29
-
30
-
> If the command above fails, run `npm install -g corepack@latest` to install the latest version of [Corepack](https://yarnpkg.com/corepack#installation).
31
-
32
27
1. Run `yarn` to install the website's workspace dependencies.
33
28
34
29
### Running locally
@@ -110,7 +105,8 @@ If you're adding a new doc or you need to alter the order the docs appear in the
110
105
111
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.ts` files will be copied over to the corresponding location within `website/versioned_docs` and `website/versioned_sidebars`.
112
107
113
-
> **_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.
108
+
> [!NOTE]
109
+
> 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.
114
110
115
111
Docusaurus keeps track of the list of versions for the site in the `website/versions.json` file. The ordering of versions in this file should be in reverse chronological order.
116
112
@@ -126,7 +122,8 @@ This can be done by updating the `package.json` and configuration files in `scri
126
122
127
123
1.`cd react-native-website` to go into the project root.
128
124
1.`cd website` to go into the website portion of the project.
129
-
1. Run `yarn version:cut <newVersion>` where `<newVersion>` is the new version being released.
125
+
1. Run `yarn version:cut <newVersion>` where `<newVersion>` is the new version being released (e.g. `0.81`).
126
+
1. Open a PR and commit this change as "Cut branch <newVersion>"
130
127
131
128
## 🔧 Website configuration
132
129
@@ -147,7 +144,7 @@ The `showcase.json` file contains the list of users that are highlighted in the
147
144
1.`git checkout main` from any folder in your local `react-native-website` repository.
148
145
1.`git pull origin main` to ensure you have the latest main code.
149
146
1.`git checkout -b the-name-of-my-branch` to create a branch.
150
-
> replace `the-name-of-my-branch` with a suitable name, such as `update-animations-page`
147
+
> replace `the-name-of-my-branch` with a suitable name, such as `update-animations-page`
151
148
152
149
### Make the change
153
150
@@ -158,7 +155,11 @@ The `showcase.json` file contains the list of users that are highlighted in the
158
155
159
156
Visit **<http://localhost:3000/docs/next/YOUR-DOCS-PAGE>** to see your work.
160
157
161
-
> Visit <http://localhost:3000/versions> to see the list of all versions of the docs.
158
+
> [!NOTE]
159
+
> Visit <http://localhost:3000/versions> to see the list of all versions of the docs, if you have backported some of the changes.
160
+
161
+
> [!TIP]
162
+
> If you're adding assets, make sure they’re optimized for the web. You can use tools like [ImageOptim](https://imageoptim.com/mac) to automatically apply lossless compression to various file types.
162
163
163
164
### Test the change
164
165
@@ -169,10 +170,10 @@ If possible, test any visual changes in all latest versions of the following bro
169
170
170
171
### Push it
171
172
172
-
1. Run `yarn prettier` and `yarn language:lint` in `./website` directory to ensure your changes are consistent with other files in the repo.
173
+
1. Run `yarn lint` and `yarn prettier` in `./website` directory to ensure your changes are consistent with other files in the repo.
173
174
1. Run `yarn update-lock` to [deduplicate dependencies](https://yarnpkg.com/cli/dedupe).
174
175
1.`git add -A && git commit -m "My message"` to stage and commit your changes.
175
-
> replace `My message` with a commit message, such as `Fixed header logo on Android`
176
+
> replace `My message` with a commit message, such as `Fixed header logo on Android`
176
177
1.`git push my-fork-name the-name-of-my-branch`
177
178
1. Go to the [react-native-website repo](https://github.com/facebook/react-native-website) and you should see recently pushed branches.
Copy file name to clipboardExpand all lines: STYLEGUIDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -137,4 +137,4 @@ When writing step-by-step instructions (e.g. how to install something), try to f
137
137
138
138
## Resources
139
139
140
-
-[React JS’s contibuting guidelines](https://github.com/reactjs/reactjs.org/blob/main/CONTRIBUTING.md#guidelines-for-text), especially the [code examples guidelines](https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md#guidelines-for-code-examples)
140
+
-[React JS’s contributing guidelines](https://github.com/reactjs/reactjs.org/blob/main/CONTRIBUTING.md#guidelines-for-text), especially the [code examples guidelines](https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md#guidelines-for-code-examples)
0 commit comments