You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+16-13Lines changed: 16 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,13 @@
1
1
# Expo Documentation
2
2
3
-
This is the public documentation for **Expo**, its SDK, client, and services.
3
+
This is the public documentation for **Expo**, its SDK, client, and services, like **EAS**.
4
4
5
-
You can access this documentation online at https://docs.expo.dev/. It's built using Next.js on top of the https://github.com/vercel/docs codebase.
5
+
This documentation is built using Next.js and you can access it online at https://docs.expo.dev/.
6
6
7
+
> **Note**
7
8
> **Contributors:** Please make sure that you edit the docs in the `pages/versions/unversioned` directory if you want your changes to apply to the next SDK version too!
8
9
10
+
> **Note**
9
11
> If you are looking for Expo Documentation Writing Style guidelines, please refer [Expo Documentation Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md).
10
12
11
13
## Running Locally
@@ -41,7 +43,8 @@ yarn run export-server
41
43
42
44
You can find the content source of the documentation inside the `pages/` directory. Documentation is mostly written in markdown with the help of some React components (for Snack embeds, etc). Our API documentation can all be found under `pages/versions/`; we keep separate versions of the documentation for each SDK version currently supported in Expo Go, see ["A note about versioning"](#a-note-about-versioning) for more info. The routes and navbar are automatically inferred from the directory structure within `versions`.
43
45
44
-
> Note: We are currently in the process of moving our API documentation to being auto-generated using `expotools`'s `GenerateDocsAPIData` command.
46
+
> **Note**
47
+
> We are currently in the process of moving our API documentation to being auto-generated using `expotools`'s `GenerateDocsAPIData` command.
45
48
46
49
Each markdown page can be provided metadata in the heading, distinguished by:
47
50
@@ -151,13 +154,14 @@ You can validate all current links by running `yarn lint-links`.
151
154
152
155
### Updating latest version of docs
153
156
154
-
When we release a new SDK, we copy the `unversioned` directory, and rename it to the new version. Latest version of docs is read from **package.json** so make sure to update the `version` key there as well. However, if you update the `version` key there, you need to `rm -rf node_modules/.cache/` before the change is picked up (why? [read this](https://github.com/vercel/next.js/blob/4.0.0/examples/with-universal-configuration/README.md#caveats)).
157
+
When we release a new SDK, we copy the `unversioned` directory, and rename it to the new version. Latest version of docs is read from **package.json** so make sure to update the `version` key there as well.
155
158
156
159
Make sure to also grab the upgrade instructions from the release notes blog post and put them in `upgrading-expo-sdk-walkthrough.md`.
157
160
158
161
That's all you need to do. The `versions` directory is listed on server start to find all available versions. The routes and navbar contents are automatically inferred from the directory structure within `versions`.
159
162
160
-
Because the navbar is automatically generated from the directory structure, the default ordering of the links under each section is alphabetical. However, for many sections, this is not ideal UX. So, if you wish to override the alphabetical ordering, manipulate page titles in **navigation.js**.
163
+
Because the navbar is automatically generated from the directory structure, the default ordering of the links under each section is alphabetical. However, for many sections, this is not ideal UX.
164
+
So, if you wish to override the alphabetical ordering, manipulate page titles in **constants/navigation.js**.
161
165
162
166
### Syncing app.json / app.config.js with the schema
163
167
@@ -226,7 +230,8 @@ import SnackInline from '~/components/plugins/SnackInline';
226
230
227
231
### Embedding multiple options of code
228
232
229
-
Sometimes it's useful to show multiple ways of doing something, for instance maybe you'd like to have an example using a React class component, and also an example of a functional component. The `Tabs` plugin is really useful for this, and this is how you'd use it an a markdown file:
233
+
Sometimes it's useful to show multiple ways of doing something, for instance maybe you'd like to have an example using a React class component, and also an example of a functional component.
234
+
The `Tabs` plugin is really useful for this, and this is how you'd use it in a markdown file:
n.b. The components should not be indented or they will not be parsed correctly.
260
263
261
-
### Excluding pages from Docsearch
264
+
### Excluding pages from DocSearch
262
265
263
266
To ignore a page from the search result, use `hideFromSearch: true` on that page. This removes the `<meta name="docsearch:version">` tag from that page and filters it from our facet-based search.
264
267
265
-
Please note that `hideFromSearch` only prevents the page from showing up in the internal docs search (Algolia). The page will still show up in search engine results like Google. For a page to be hidden even from search engine results, you need to edit the sitemap that is generated via our Next.js config (**config.js**).
268
+
Please note that `hideFromSearch` only prevents the page from showing up in the internal docs search (Algolia). The page will still show up in search engine results like Google.
269
+
For a page to be hidden even from search engine results, you need to edit the sitemap that is generated via our Next.js config (**next.config.js**).
266
270
267
271
### Excluding directories from the sidebar
268
272
269
-
Certain directories are excluded from the sidebar in order to prevent it from getting too long and unnavigable. You can find a list of these directories, and add new ones, in **navigation.js** under `hiddenSections`.
273
+
Certain directories are excluded from the sidebar in order to prevent it from getting too long and unnavigable. You can find a list of these directories, and add new ones, in **constants/navigation.js** under `hiddenSections`.
270
274
271
275
If you just want to hide a single page from the sidebar, set `hideInSidebar: true` in the page metadata.
272
276
@@ -296,10 +300,9 @@ import { Terminal } from '~/ui/components/Snippet';
296
300
297
301
Please commit any sizeable diffs that are the result of `prettier` separately to make reviews as easy as possible.
298
302
299
-
If you have a codeblock using `/* @info */` highlighting, use `<!-- prettier-ignore -->` on the block and take care to preview the block in the browser to ensure that the indentation is correct - the highlighting annotation will sometimes swallow newlines.
303
+
If you have a code block using `/* @info */` highlighting, use `{/* prettier-ignore */}` on the block and take care to preview the block in the browser to ensure that the indentation is correct - the highlighting annotation will sometimes swallow newlines.
300
304
301
305
## TODOs:
302
306
303
307
- Handle image sizing in imports better
304
-
- Read from the appropriate version (configurable) of the React Native docs, not just main
305
308
- Make Snack embeds work; these are marked in some of the React Native docs but they are just imported as plain JS code blocks
0 commit comments