- Notifications
You must be signed in to change notification settings - Fork0
The site and docs for React Native
License
MIT, CC-BY-4.0 licenses found
Licenses found
ReactJSMyanmar/react-native-website
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repo contains the website configuration and documentation powering theReact Native website.
- Git
- Node: install version 8 or greater.
- Yarn: SeeYarn website for installation instructions. (needs 1.5 or greater).
- A fork of the repo (for any contributions).
- A clone of the
react-native-websiterepo.
cd react-native-websiteto go into the project root.cd websiteto go into the website portion of the project.yarnto install the website's npm dependencies (ornpm install, if not using Yarn).
yarn startto start the development server (powered by Docusaurus) (ornpm start, if not using Yarn).open http://localhost:3000/to open the site in your favorite browser.
If you would like tocontribute an edit or addition to the docs, read through ourstyle guide before you write anything. All our content is generated from markdown files you can find in the 'docs/' directory.
To edit the internals of how the site is built, you may want to get familiarized with how the site is built. The React Native website is a static site generated usingDocusaurus. The website configuration can be found in the 'website/' directory. Visit the Docusaurus website to learn more about all the available configuration options.
The following is a high-level overview of relevant files and folders.
react-native-website/├── docs/│ ├── assets/│ ├── accessibility.md│ └── ...└── website/ ├── blog/ │ ├── assets/ │ ├── 2015-03-26-react-native-bringing-modern-web-techniques-to-mobile.md │ └── ... ├── core/ ├── pages/ │ └── en/ │ ├── ... │ ├── index.js │ └── ... ├── static/ │ ├── css/ │ ├── img/ │ └── js/ ├── versioned_docs/ │ ├── version-0.5/ │ └── ... ├── versioned_sidebars/ │ ├── version-0.5-sidebars.json │ └── ... ├── showcase.json ├── sidebars.json ├── siteConfig.js └── versions.jsonAs mentioned above, the 'docs/' folder contains the source files for all of the docs in the React Native website. In most cases, you will want to edit the files within this directory. 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' file in the 'website/' directory. The sidebars file contains a list of document ids that should match those defined in the header metadata (aka frontmatter) of the docs markdown files.
The React Native website is versioned as to allow users to go back and see the API reference docs for any given release. A new version of the website is generally made 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/'.
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 docs.
Docusaurus keeps track of the list of versions for the site in the 'website/versions.json' file. The ordering of the versions in this file should be in reverse chronological order.
cd react-native-websiteto go into the project root.cd websiteto go into the website portion of the project.- Run
yarn run version <newVersion>where<newVersion>is the new version being released.
The main config file for the website can be found at 'website/siteConfig.js'. This file tellsDocusaurus how to build the website. Edits to this file are rarely necessary.
The 'pages/' subdirectory contains the React components that make up the non-documentation pages of the site, such as the homepage.
The 'showcase.json' file contains the list of users that are highlighted in the React Native showcase.
git checkout masterfrom any folder in your localreact-native-websiterepository.git pull origin masterto ensure you have the latest main code.git checkout -b the-name-of-my-branch(replacingthe-name-of-my-branchwith a suitable name) to create a branch.
- Follow the "Running locally" instructions.
- Save the files and check in the browser. Some changes may require a server restart.
- Changes to /docs will only be visible in the latest version of the documentation (master).
open http://localhost:3000/react-native/versions.html to see other versions.
If possible, test any visual changes in all latest versions of Firefox and Chrome on desktop and Safari and Chrome on mobile.
- Run
yarn prettierto ensure your changes are consistent with other files in the repo. git add -A && git commit -m "My message"(replacingMy messagewith a commit message, such asFixed header logo on Android) to stage and commit your changes.git push my-fork-name the-name-of-my-branch- Go to thereact-native-website repo and you should see recently pushed branches.
- Follow GitHub's instructions.
- If possible, include screenshots of visual changes.
React Native isMIT licensed.
React Native documentation isCreative Commons licensed.
About
The site and docs for React Native
Resources
License
MIT, CC-BY-4.0 licenses found
Licenses found
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- JavaScript62.9%
- CSS32.8%
- HTML4.3%