Skip to content

Commit 3ef49c8

Browse files
authored
update project structure in Readme (#3031)
1 parent 0d29432 commit 3ef49c8

1 file changed

Lines changed: 30 additions & 15 deletions

File tree

README.md

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ If you are looking for the source code of the [React Native Archive website](htt
3535

3636
## 📖 Overview
3737

38-
If you would like to **_contribute an edit or addition to the docs,_** read through our [style guide](STYLEGUIDE.md) before you write anything. All our content is generated from markdown files you can find in the `docs` directory.
38+
If you would like to **_contribute an edit or addition to the docs,_** read through our [style guide](STYLEGUIDE.md) before you write anything.
39+
Almost all our content is generated from markdown files you can find in the `docs`, `website/architecure` and `website/contibuting` directories.
3940

40-
**_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://v2.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.
41+
**_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/).
42+
The website configuration can be found in the `website` directory. Visit the Docusaurus website to learn more about all the available configuration options.
4143

4244
### Directory Structure
4345

@@ -46,52 +48,65 @@ The following is a high-level overview of relevant files and folders.
4648
```
4749
react-native-website/
4850
├── docs/
49-
│ ├── accessibility.md
51+
│ ├── [BASE VERSIONED DOC FILES]
5052
│ └── ...
5153
└── website/
54+
├── architecture/
55+
│ ├── [ARCHITECTURE DOC FILES]
56+
│ └── ...
5257
├── blog/
53-
│ ├── 2015-03-26-react-native-bringing-modern-web-techniques-to-mobile.md
58+
│ ├── [BLOG POSTS]
59+
│ └── ...
60+
├── contributing/
61+
│ ├── [CONTRIBUTING DOC FILES]
5462
│ └── ...
5563
├── core/
56-
├── pages/
57-
│ └── en/
64+
├── [CUSTOM COMPONENTS]
65+
│ └── ...
5866
├── src/
5967
│ ├── css/
60-
│ │ ├── customTheme.scss
68+
│ │ ├── [CUSTOM STYLES]
6169
│ │ └── ...
6270
│ ├── pages/
63-
│ │ ├── index.js
71+
│ │ ├── [STATIC PAGES]
6472
│ │ └── ...
6573
│ └── theme/
74+
│ │ ├── [SWIZZLED COMPONENTS]
75+
│ │ └── ...
6676
├── static/
6777
│ ├── blog/
6878
│ │ └── assets/
6979
│ ├── docs/
7080
│ │ └── assets/
71-
│ ├── img/
72-
│ └── js/
81+
│ └── img/
7382
├── versioned_docs/
74-
│ ├── version-0.60/
83+
│ ├── [GENERATED VERSIONED DOC FILES]
7584
│ └── ...
7685
├── versioned_sidebars/
77-
│ ├── version-0.60-sidebars.json
86+
│ ├── [GENERATED VERSIONED SIDEBARS]
7887
│ └── ...
7988
├── docusaurus.config.js
8089
├── package.json
8190
├── showcase.json
8291
├── sidebars.json
92+
├── sidebarsArchitecture.json
93+
├── sidebarsContributing.json
8394
└── versions.json
8495
```
8596

8697
### Documentation sources
8798

88-
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.
99+
As mentioned above, the `docs` folder contains the source files for docs from "Guides", "Components" and "APIs" tabs on the React Native website (versioned docs).
100+
The doc files for the "Architecture" and "Contribution" tabs are located inside `website` in the respective directories (unversioned/static docs).
101+
In most cases, you will only want to edit the files within those directories.
102+
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.json`, `sidebarsArchitecture.json` and `sidebarsContributing.json` files in the `website` directory. The sidebar files contains a list of document ids that should match those defined in the header metadata (aka frontmatter) of the docs markdown files.
89104

90105
### Versioned docs
91106

92-
The React Native website is versioned to allow users to go back and see the API reference docs 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.json` files will be copied over to the corresponding location within `website/versioned_docs` and `website/versioned_sidebars`.
93108

94-
> **_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 docs.
109+
> **_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.
95110
96111
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.
97112

0 commit comments

Comments
 (0)