Skip to content

Commit

Permalink
Upgrade to docusaurus@1.8.0 (#872)
Browse files Browse the repository at this point in the history
* Upgrade to docusaurus@1.8.0

* Bump versions in README
  • Loading branch information
charpeni authored Apr 9, 2019
1 parent 69f56c5 commit e28868e
Show file tree
Hide file tree
Showing 3 changed files with 2,448 additions and 2,214 deletions.
82 changes: 22 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
# [facebook.github.io/react-native/](https://facebook.github.io/react-native/) · [![Circle CI Status](https://circleci.com/gh/facebook/react-native-website.svg?style=shield)](https://circleci.com/gh/facebook/react-native-website) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
# [facebook.github.io/react-native/](https://facebook.github.io/react-native/) · [![Circle CI Status](https://circleci.com/gh/facebook/react-native-website.svg?style=shield)](https://circleci.com/gh/facebook/react-native-website) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)

This repo contains the website configuration and documentation powering the
[React Native website](https://facebook.github.io/react-native/).
This repo contains the website configuration and documentation powering the [React Native website](https://facebook.github.io/react-native/).

## Getting started

### Prerequisites

1. Git
1. Node: install version 6.2.2 or greater. Node v8 would be ideal.
1. Yarn: See
[Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/).
1. Node: install version 8 or greater.
1. Yarn: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/). (needs 1.5 or greater).
1. A fork of the repo (for any contributions).
1. A clone of the `react-native-website` repo.
1. Docusaurus: Run `yarn global add docusaurus-init` or `npm install --global docusaurus-init`
1. Prettier: See
[Prettier website for installation instructions](https://prettier.io/docs/en/install.html).
1. Prettier: See [Prettier website for installation instructions](https://prettier.io/docs/en/install.html).

### Installation

1. `cd react-native-website` to go into the project root.
1. `cd website` to go into the website portion of the project.
1. `yarn` to install the website's npm dependencies (or `npm install`, if not
using Yarn).
1. `yarn` to install the website's npm dependencies (or `npm install`, if not using Yarn).

### Running locally

Expand All @@ -31,14 +27,9 @@ This repo contains the website configuration and documentation powering the

# Overview

If you're here because you would like to contribute an edit or addition to the
docs, you'll probably want to take a look at the 'docs/' directory.
If you're here because you would like to contribute an edit or addition to the docs, you'll probably want to take a look at 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
using [Docusaurus](https://docusaurus.io). The website configuration can be
found in the 'website/' directory. Visit the Docusaurus website to learn more
about all the available configuration options.
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 using [Docusaurus](https://docusaurus.io). The website configuration can be found in the 'website/' directory. Visit the Docusaurus website to learn more about all the available configuration options.

## Directory Structure

Expand Down Expand Up @@ -79,60 +70,37 @@ react-native-website/

## Documentation sources

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

### Versioned docs

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

#### Cutting a new version

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 <version>` where `<version>` is the new version being
released.
1. Run `yarn version <version>` where `<version>` is the new version being released.

## Website configuration

The main config file for the website can be found at 'website/siteConfig.js'.
This file tells
[Docusaurus how to build the website](http://docusaurus.io/docs/en/site-config.html).
Edits to this file are rarely necessary.
The main config file for the website can be found at 'website/siteConfig.js'. This file tells [Docusaurus how to build the website](http://docusaurus.io/docs/en/site-config.html). 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 '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.
The 'showcase.json' file contains the list of users that are highlighted in the React Native showcase.

## Contributing

### Create a branch

1. `git checkout master` from any folder in your local `react-native-website`
repository.
1. `git checkout master` from any folder in your local `react-native-website` repository.
1. `git pull origin master` to ensure you have the latest main code.
1. `git checkout -b the-name-of-my-branch` (replacing `the-name-of-my-branch`
with a suitable name) to create a branch.
1. `git checkout -b the-name-of-my-branch` (replacing `the-name-of-my-branch` with a suitable name) to create a branch.

### Make the change

Expand All @@ -144,20 +112,14 @@ React Native showcase.

### Test the change

1. If possible, test any visual changes in all latest versions of common
browsers, on both desktop and mobile.
1. If possible, test any visual changes in all latest versions of common browsers, on both desktop and mobile.

### Push it

1. Run `yarn prettier` to ensure your changes are consistent with other files in
the repo.
1. `git add -A && git commit -m "My message"` (replacing `My message` with a
commit message, such as `Fixed header logo on Android`) to stage and commit
your changes.
1. Run `yarn prettier` to ensure your changes are consistent with other files in the repo.
1. `git add -A && git commit -m "My message"` (replacing `My message` with a commit message, such as `Fixed header logo on Android`) to stage and commit your changes.
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. 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. If possible, include screenshots of visual changes.

Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}
},
"dependencies": {
"docusaurus": "1.3.3",
"docusaurus": "1.8.0",
"highlight.js": "^9.12.0",
"remarkable": "^1.7.1"
},
Expand Down
Loading

0 comments on commit e28868e

Please sign in to comment.