Skip to content

Commit 2a7fd5a

Browse files
ehfengTimer
authored andcommitted
Fixing Internal Links (#5552)
* Fixing Internal Links Internal links, like those found on [Available Scripts](https://facebook.github.io/create-react-app/docs/available-scripts) use absolute urls and therefore link to https://facebook.github.io/docs/deployment instead of https://facebook.github.io/create-react-app/docs/deployment. * changing to markdown links and fixing various broken internal links
1 parent feea693 commit 2a7fd5a

15 files changed

+26
-25
lines changed

docusaurus/docs/adding-a-css-modules-stylesheet.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar_label: Adding CSS Modules
88
99
This project supports [CSS Modules](https://github.com/css-modules/css-modules) alongside regular stylesheets using the `[name].module.css` file naming convention. CSS Modules allows the scoping of CSS by automatically creating a unique classname of the format `[filename]\_[classname]\_\_[hash]`.
1010

11-
> **Tip:** Should you want to preprocess a stylesheet with Sass then make sure to [follow the installation instructions](/docs/adding-a-sass-stylesheet) and then change the stylesheet file extension as follows: `[name].module.scss` or `[name].module.sass`.
11+
> **Tip:** Should you want to preprocess a stylesheet with Sass then make sure to [follow the installation instructions](adding-a-sass-stylesheet.md) and then change the stylesheet file extension as follows: `[name].module.scss` or `[name].module.sass`.
1212
1313
CSS Modules let you use the same CSS class name in different files without worrying about naming clashes. Learn more about CSS Modules [here](https://css-tricks.com/css-modules-part-1-need/).
1414

docusaurus/docs/adding-a-router.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ yarn add react-router-dom
1919

2020
To try it, delete all the code in `src/App.js` and replace it with any of the examples on its website. The [Basic Example](https://reacttraining.com/react-router/web/example/basic) is a good place to get started.
2121

22-
Note that [you may need to configure your production server to support client-side routing](/docs/deployments#serving-apps-with-client-side-routing) before deploying your app.
22+
Note that [you may need to configure your production server to support client-side routing](deployment.md#serving-apps-with-client-side-routing) before deploying your app.

docusaurus/docs/adding-a-sass-stylesheet.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This will allow you to do imports like
3030
@import '~nprogress/nprogress'; // importing a css file from the nprogress node module
3131
```
3232

33-
> **Tip:** You can opt into using this feature with [CSS modules](/docs/adding-a-css-modules-stylesheet) too!
33+
> **Tip:** You can opt into using this feature with [CSS modules](adding-a-css-modules-stylesheet.md) too!
3434
3535
> **Note:** You must prefix imports from `node_modules` with `~` as displayed above.
3636

docusaurus/docs/adding-custom-environment-variables.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ id: adding-custom-environment-variables
33
title: Adding Custom Environment Variables
44
sidebar_label: Environment Variables
55
---
6+
67
> Note: this feature is available with `react-scripts@0.2.3` and higher.
78
89
Your project can consume variables declared in your environment as if they were declared locally in your JS files. By
910
default you will have `NODE_ENV` defined for you, and any other environment variables starting with
1011
`REACT_APP_`.
1112

12-
**The environment variables are embedded during the build time**. Since Create React App produces a static HTML/CSS/JS bundle, it can’t possibly read them at runtime. To read them at runtime, you would need to load HTML into memory on the server and replace placeholders in runtime, just like [described here](/docs/injecting-data-from-the-server-into-the-page). Alternatively you can rebuild the app on the server anytime you change them.
13+
**The environment variables are embedded during the build time**. Since Create React App produces a static HTML/CSS/JS bundle, it can’t possibly read them at runtime. To read them at runtime, you would need to load HTML into memory on the server and replace placeholders in runtime, just like [described here](title-and-meta-tags.md#injecting-data-from-the-server-into-the-page). Alternatively you can rebuild the app on the server anytime you change them.
1314

1415
> Note: You must create custom environment variables beginning with `REACT_APP_`. Any other variables except `NODE_ENV` will be ignored to avoid accidentally [exposing a private key on the machine that could have the same name](https://github.com/facebook/create-react-app/issues/865#issuecomment-252199527). Changing any environment variables will require you to restart the development server if it is running.
1516
@@ -77,7 +78,7 @@ You can also access the environment variables starting with `REACT_APP_` in the
7778
Note that the caveats from the above section apply:
7879

7980
- Apart from a few built-in variables (`NODE_ENV` and `PUBLIC_URL`), variable names must start with `REACT_APP_` to work.
80-
- The environment variables are injected at build time. If you need to inject them at runtime, [follow this approach instead](/docs/generating-dynamic-meta-tags-on-the-server).
81+
- The environment variables are injected at build time. If you need to inject them at runtime, [follow this approach instead](title-and-meta-tags.md#generating-dynamic-meta-tags-on-the-server).
8182

8283
## Adding Temporary Environment Variables In Your Shell
8384

docusaurus/docs/advanced-configuration.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ id: advanced-configuration
33
title: Advanced Configuration
44
---
55

6-
You can adjust various development and production settings by setting environment variables in your shell or with [.env](/docs/adding-development-environment-variables-in-env).
6+
You can adjust various development and production settings by setting environment variables in your shell or with [.env](adding-custom-environment-variables.md#adding-development-environment-variables-in-env).
77

88
| Variable | Development | Production | Usage |
99
| :------------------- | :---------: | :--------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1010
| BROWSER | ✅ Used | 🚫 Ignored | By default, Create React App will open the default system browser, favoring Chrome on macOS. Specify a [browser](https://github.com/sindresorhus/opn#app) to override this behavior, or set it to `none` to disable it completely. If you need to customize the way the browser is launched, you can specify a node script instead. Any arguments passed to `npm start` will also be passed to this script, and the url where your app is served will be the last argument. Your script's file name must have the `.js` extension. |
1111
| HOST | ✅ Used | 🚫 Ignored | By default, the development web server binds to `localhost`. You may use this variable to specify a different host. |
1212
| PORT | ✅ Used | 🚫 Ignored | By default, the development web server will attempt to listen on port 3000 or prompt you to attempt the next available port. You may use this variable to specify a different port. |
1313
| HTTPS | ✅ Used | 🚫 Ignored | When set to `true`, Create React App will run the development server in `https` mode. |
14-
| PUBLIC_URL | 🚫 Ignored | ✅ Used | Create React App assumes your application is hosted at the serving web server's root or a subpath as specified in [`package.json` (`homepage`)](/docs/deployment#building-for-relative-paths). Normally, Create React App ignores the hostname. You may use this variable to force assets to be referenced verbatim to the url you provide (hostname included). This may be particularly useful when using a CDN to host your application. |
14+
| PUBLIC_URL | 🚫 Ignored | ✅ Used | Create React App assumes your application is hosted at the serving web server's root or a subpath as specified in [`package.json` (`homepage`)](deployment#building-for-relative-paths). Normally, Create React App ignores the hostname. You may use this variable to force assets to be referenced verbatim to the url you provide (hostname included.md). This may be particularly useful when using a CDN to host your application. |
1515
| CI | ✅ Used | ✅ Used | When set to `true`, Create React App treats warnings as failures in the build. It also makes the test runner non-watching. Most CIs set this flag by default. |
1616
| REACT_EDITOR | ✅ Used | 🚫 Ignored | When an app crashes in development, you will see an error overlay with clickable stack trace. When you click on it, Create React App will try to determine the editor you are using based on currently running processes, and open the relevant source file. You can [send a pull request to detect your editor of choice](https://github.com/facebook/create-react-app/issues/2636). Setting this environment variable overrides the automatic detection. If you do it, make sure your systems [PATH](<https://en.wikipedia.org/wiki/PATH_(variable)>) environment variable points to your editor’s bin folder. You can also set it to `none` to disable it completely. |
1717
| CHOKIDAR_USEPOLLING | ✅ Used | 🚫 Ignored | When set to `true`, the watcher runs in polling mode, as necessary inside a VM. Use this option if `npm start` isn't detecting changes. |

docusaurus/docs/alternatives-to-ejecting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ id: alternatives-to-ejecting
33
title: Alternatives to Ejecting
44
---
55

6-
[Ejecting](/docs/available-scripts#npm-run-eject) lets you customize anything, but from that point on you have to maintain the configuration and scripts yourself. This can be daunting if you have many similar projects. In such cases instead of ejecting we recommend to _fork_ `react-scripts` and any other packages you need. [This article](https://auth0.com/blog/how-to-configure-create-react-app/) dives into how to do it in depth. You can find more discussion in [this issue](https://github.com/facebook/create-react-app/issues/682).
6+
[Ejecting](available-scripts.md#npm-run-eject) lets you customize anything, but from that point on you have to maintain the configuration and scripts yourself. This can be daunting if you have many similar projects. In such cases instead of ejecting we recommend to _fork_ `react-scripts` and any other packages you need. [This article](https://auth0.com/blog/how-to-configure-create-react-app/) dives into how to do it in depth. You can find more discussion in [this issue](https://github.com/facebook/create-react-app/issues/682.md).

docusaurus/docs/available-scripts.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ The page will reload if you make edits. You will also see any lint errors in the
1414

1515
## `npm test`
1616

17-
Launches the test runner in the interactive watch mode. See the section about [running tests](/docs/running-tests) for more information.
17+
Launches the test runner in the interactive watch mode. See the section about [running tests](running-tests.md) for more information.
1818

1919
## `npm run build`
2020

2121
Builds the app for production to the `build` folder. It correctly bundles React in production mode and optimizes the build for the best performance.
2222

2323
The build is minified and the filenames include the hashes. Your app is ready to be deployed!
2424

25-
See the section about [deployment](/docs/deployment) for more information.
25+
See the section about [deployment](deployment.md) for more information.
2626

2727
## `npm run eject`
2828

docusaurus/docs/deployment.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ If you’re using [Apache Tomcat](http://tomcat.apache.org/), you need to follow
7979

8080
Now requests to `/todos/42` will be handled correctly both in development and in production.
8181

82-
On a production build, and when you've [opted-in](/docs/making-a-progressive-web-app#why-opt-in),
82+
On a production build, and when you've [opted-in](making-a-progressive-web-app.md#why-opt-in),
8383
a [service worker](https://developers.google.com/web/fundamentals/primers/service-workers/) will automatically handle all navigation requests, like for
8484
`/todos/42`, by serving the cached copy of your `index.html`. This
8585
service worker navigation routing can be configured or disabled by
86-
[`eject`ing](/docs/available-scripts#npm-run-eject) and then modifying the
86+
[`eject`ing](available-scripts.md#npm-run-eject) and then modifying the
8787
[`navigateFallback`](https://github.com/GoogleChrome/sw-precache#navigatefallback-string)
8888
and [`navigateFallbackWhitelist`](https://github.com/GoogleChrome/sw-precache#navigatefallbackwhitelist-arrayregexp)
8989
options of the `SWPreachePlugin` [configuration](../config/webpack.config.prod.js).

docusaurus/docs/making-a-progressive-web-app.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ following into account:
7373
If your production web server does not support HTTPS, then the service worker
7474
registration will fail, but the rest of your web app will remain functional.
7575

76-
1. The service worker is only enabled in the [production environment](/docs/deployment),
76+
1. The service worker is only enabled in the [production environment](deployment.md),
7777
e.g. the output of `npm run build`. It's recommended that you do not enable an
7878
offline-first service worker in a development environment, as it can lead to
7979
frustration when previously cached assets are used and do not include the latest
@@ -82,12 +82,12 @@ following into account:
8282
1. If you _need_ to test your offline-first service worker locally, build
8383
the application (using `npm run build`) and run a simple http server from your
8484
build directory. After running the build script, `create-react-app` will give
85-
instructions for one way to test your production build locally and the [deployment instructions](/docs/deployment) have
85+
instructions for one way to test your production build locally and the [deployment instructions](deployment.md) have
8686
instructions for using other methods. _Be sure to always use an
8787
incognito window to avoid complications with your browser cache._
8888

8989
1. By default, the generated service worker file will not intercept or cache any
90-
cross-origin traffic, like HTTP [API requests](/docs/integrating-with-an-api-backend),
90+
cross-origin traffic, like HTTP [API requests](integrating-with-an-api-backend.md),
9191
images, or embeds loaded from a different domain.
9292

9393
## Progressive Web App Metadata

docusaurus/docs/proxying-api-requests-in-development.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ If the `proxy` option is **not** flexible enough for you, alternatively you can:
3838

3939
- [Configure the proxy yourself](#configuring-the-proxy-manually)
4040
- Enable CORS on your server ([here’s how to do it for Express](http://enable-cors.org/server_expressjs.html)).
41-
- Use [environment variables](/docs/adding-custom-environment-variables) to inject the right server host and port into your app.
41+
- Use [environment variables](adding-custom-environment-variables.md) to inject the right server host and port into your app.
4242

4343
## "Invalid Host Header" Errors After Configuring Proxy
4444

docusaurus/docs/setting-up-your-editor.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Then add the block below to your `launch.json` file and put it inside the `.vsco
6363
}
6464
```
6565

66-
> Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](/docs/advanced-configuration).
66+
> Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](advanced-configuration.md).
6767
6868
Start your app by running `npm start`, and start debugging in VS Code by pressing `F5` or by clicking the green debug icon. You can now write code, set breakpoints, make changes to the code, and debug your newly modified code—all from your editor.
6969

@@ -75,7 +75,7 @@ You would need to have [WebStorm](https://www.jetbrains.com/webstorm/) and [JetB
7575

7676
In the WebStorm menu `Run` select `Edit Configurations...`. Then click `+` and select `JavaScript Debug`. Paste `http://localhost:3000` into the URL field and save the configuration.
7777

78-
> Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](/docs/advanced-configuration).
78+
> Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](advanced-configuration.md).
7979
8080
Start your app by running `npm start`, then press `^D` on macOS or `F9` on Windows and Linux or click the green debug icon to start debugging in WebStorm.
8181

0 commit comments

Comments
 (0)