Skip to content

Commit

Permalink
Fix some markdown files (#4394)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
hichemfantar authored Dec 30, 2024
1 parent 5943a5a commit 5f22457
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 41 deletions.
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ members of the project's leadership.
## Attribution

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

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

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
<https://www.contributor-covenant.org/faq>
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The [Open Source Guides](https://opensource.guide/) website has a collection of
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
- [Building Welcoming Communities](https://opensource.guide/building-community/)

### Code of Conduct
## Code of Conduct

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

Expand Down
69 changes: 35 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ If you are looking for the source code of the [React Native Archive website](htt

### Prerequisites

1. [Git](https://git-scm.com/downloads).
1. [Node](https://nodejs.org/en/download/) _(version 12 or greater)_.
1. [Yarn](https://yarnpkg.com/lang/en/docs/install/) _(version 1.5 or greater)_.
1. A fork of the repo _(for any contributions)_.
1. A clone of the `react-native-website` repo.
1. [Git](https://git-scm.com/downloads).
1. [Node](https://nodejs.org/en/download/) _(version 12 or greater)_.
1. [Yarn](https://yarnpkg.com/lang/en/docs/install/) _(version 1.5 or greater)_.
1. A fork of the repo _(for any contributions)_.
1. A clone of the `react-native-website` repo.

### Installation

1. `cd react-native-website` to go into the project root.
1. Run `yarn` to install the website's workspace dependencies.
1. `cd react-native-website` to go into the project root.
1. Run `yarn` to install the website's workspace dependencies.

### Running locally

1. Run `yarn start` to start the development server _(powered by [Docusaurus](https://v2.docusaurus.io))_.
1. Open http://localhost:3000/ site in your favorite browser.
1. Run `yarn start` to start the development server _(powered by [Docusaurus](https://docusaurus.io))_.
1. Open <http://localhost:3000/> site in your favorite browser.

## 📖 Overview

Expand Down Expand Up @@ -84,12 +84,13 @@ react-native-website/
├── versioned_sidebars/
│ ├── [GENERATED VERSIONED SIDEBARS]
│ └── ...
├── docusaurus.config.js
├── docusaurus.config.ts
├── package.json
├── showcase.json
├── sidebars.json
├── sidebarsArchitecture.json
├── sidebarsContributing.json
├── sidebars.ts
├── sidebarsArchitecture.ts
├── sidebarsCommunity.ts
├── sidebarsContributing.ts
└── versions.json
```

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

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

### Versioned docs

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

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

##### After Release

1. `cd react-native-website` to go into the project root.
1. `cd website` to go into the website portion of the project.
1. Run `yarn version:cut <newVersion>` where `<newVersion>` is the new version being released.
1. `cd react-native-website` to go into the project root.
1. `cd website` to go into the website portion of the project.
1. Run `yarn version:cut <newVersion>` where `<newVersion>` is the new version being released.

## 🔧 Website configuration

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

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

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

### Create a branch

1. `git checkout main` from any folder in your local `react-native-website` repository.
1. `git pull origin main` to ensure you have the latest main code.
1. `git checkout -b the-name-of-my-branch` to create a branch.
1. `git checkout main` from any folder in your local `react-native-website` repository.
1. `git pull origin main` to ensure you have the latest main code.
1. `git checkout -b the-name-of-my-branch` to create a branch.
> replace `the-name-of-my-branch` with a suitable name, such as `update-animations-page`
### Make the change

1. Follow the "[Running locally](#running-locally)" instructions.
1. Save the files and check in the browser.
1. Some changes may require a server restart to generate new files. (Pages in `docs` always do!)
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.
1. Follow the "[Running locally](#running-locally)" instructions.
1. Save the files and check in the browser.
1. Some changes may require a server restart to generate new files. (Pages in `docs` always do!)
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.

Visit **http://localhost:3000/docs/next/YOUR-DOCS-PAGE** to see your work.
Visit **<http://localhost:3000/docs/next/YOUR-DOCS-PAGE>** to see your work.

> Visit http://localhost:3000/versions to see the list of all versions of the docs.
> Visit <http://localhost:3000/versions> to see the list of all versions of the docs.
### Test the change

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

### Push it

1. Run `yarn prettier` and `yarn language:lint` in `./website` directory to ensure your changes are consistent with other files in the repo.
1. `git add -A && git commit -m "My message"` to stage and commit your changes.
1. Run `yarn prettier` and `yarn language:lint` in `./website` directory to ensure your changes are consistent with other files in the repo.
1. `git add -A && git commit -m "My message"` to stage and commit your changes.
> replace `My message` with a commit message, such as `Fixed header logo on Android`
1. `git push my-fork-name the-name-of-my-branch`
1. Go to the [react-native-website repo](https://github.com/facebook/react-native-website) and you should see recently pushed branches.
1. Follow GitHub's instructions.
1. Describe briefly your changes (in case of visual changes, please include screenshots).
1. `git push my-fork-name the-name-of-my-branch`
1. Go to the [react-native-website repo](https://github.com/facebook/react-native-website) and you should see recently pushed branches.
1. Follow GitHub's instructions.
1. Describe briefly your changes (in case of visual changes, please include screenshots).

## 📄 License

Expand Down
2 changes: 1 addition & 1 deletion STYLEGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ When it comes to describing property values, be definitive in what is and is not

## Other grammar policies

* Capitalize “Hooks.”
- Capitalize “Hooks.”

## Empathize with readers

Expand Down
2 changes: 1 addition & 1 deletion plugins/remark-lint-no-dead-urls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

```
```js
module.exports = {
plugins: [
'@react-native-website/remark-lint-no-broken-external-links',
Expand Down
2 changes: 1 addition & 1 deletion plugins/remark-snackplayer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default YourApp;

The above code snippet would look like this:

<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">
<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"/>

### Parameters

Expand Down
2 changes: 1 addition & 1 deletion scripts/lint-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

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.

### Arguments
## Arguments

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

0 comments on commit 5f22457

Please sign in to comment.