Skip to content

Commit 5f22457

Browse files
authoredDec 30, 2024
Fix some markdown files (#4394)
* 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
1 parent 5943a5a commit 5f22457

File tree

7 files changed

+42
-41
lines changed

7 files changed

+42
-41
lines changed
 

‎CODE_OF_CONDUCT.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ members of the project's leadership.
7272
## Attribution
7373

7474
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
75-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
75+
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
7676

7777
[homepage]: https://www.contributor-covenant.org
7878

7979
For answers to common questions about this code of conduct, see
80-
https://www.contributor-covenant.org/faq
80+
<https://www.contributor-covenant.org/faq>

‎CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The [Open Source Guides](https://opensource.guide/) website has a collection of
77
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
88
- [Building Welcoming Communities](https://opensource.guide/building-community/)
99

10-
### Code of Conduct
10+
## Code of Conduct
1111

1212
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).
1313

‎README.md

+35-34
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ If you are looking for the source code of the [React Native Archive website](htt
1616

1717
### Prerequisites
1818

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.
2424

2525
### Installation
2626

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.
2929

3030
### Running locally
3131

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.
3434

3535
## 📖 Overview
3636

@@ -84,12 +84,13 @@ react-native-website/
8484
├── versioned_sidebars/
8585
│ ├── [GENERATED VERSIONED SIDEBARS]
8686
│ └── ...
87-
├── docusaurus.config.js
87+
├── docusaurus.config.ts
8888
├── package.json
8989
├── showcase.json
90-
├── sidebars.json
91-
├── sidebarsArchitecture.json
92-
├── sidebarsContributing.json
90+
├── sidebars.ts
91+
├── sidebarsArchitecture.ts
92+
├── sidebarsCommunity.ts
93+
├── sidebarsContributing.ts
9394
└── versions.json
9495
```
9596

@@ -99,11 +100,11 @@ As mentioned above, the `docs` folder contains the source files for docs from "G
99100
The doc files for the "Architecture" and "Contribution" tabs are located inside `website` in the respective directories (unversioned/static docs).
100101
In most cases, you will only want to edit the files within those directories.
101102

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.
103104

104105
### Versioned docs
105106

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`.
107108

108109
> **_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.
109110
@@ -119,13 +120,13 @@ This can be done by updating the `package.json` and configuration files in `scri
119120

120121
##### After Release
121122

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.
125126

126127
## 🔧 Website configuration
127128

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.
129130

130131
The `core` subdirectory contains JavaScript and React components that are the core part of the website.
131132

@@ -139,21 +140,21 @@ The `showcase.json` file contains the list of users that are highlighted in the
139140

140141
### Create a branch
141142

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.
145146
> replace `the-name-of-my-branch` with a suitable name, such as `update-animations-page`
146147
147148
### Make the change
148149

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.
153154

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.
155156

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.
157158
158159
### Test the change
159160

@@ -164,13 +165,13 @@ If possible, test any visual changes in all latest versions of the following bro
164165

165166
### Push it
166167

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.
169170
> 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).
174175

175176
## 📄 License
176177

‎STYLEGUIDE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ When it comes to describing property values, be definitive in what is and is not
121121

122122
## Other grammar policies
123123

124-
* Capitalize “Hooks.”
124+
- Capitalize “Hooks.”
125125

126126
## Empathize with readers
127127

‎plugins/remark-lint-no-dead-urls/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Add to your `.remarkrc.js` as a plugin:
88

9-
```
9+
```js
1010
module.exports = {
1111
plugins: [
1212
'@react-native-website/remark-lint-no-broken-external-links',

‎plugins/remark-snackplayer/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default YourApp;
2727

2828
The above code snippet would look like this:
2929

30-
<img width="783" alt="Screenshot 2020-10-03 at 1 11 19 AM" src="https://user-images.githubusercontent.com/11258286/94963203-67de3500-0515-11eb-974a-a2289c0bfdc8.png">
30+
<img width="783" alt="Screenshot 2020-10-03 at 1 11 19 AM" src="https://user-images.githubusercontent.com/11258286/94963203-67de3500-0515-11eb-974a-a2289c0bfdc8.png"/>
3131

3232
### Parameters
3333

‎scripts/lint-examples/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
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.
44

5-
### Arguments
5+
## Arguments
66

77
Command line arguments (e.g. `--fix`) are currently forwarded to ESLint.

0 commit comments

Comments
 (0)
Please sign in to comment.