Skip to content

Commit 8378f0f

Browse files
PaulMestfacebook-github-bot
authored andcommitted
Ensure documentation has consistent relative links
Summary: Explain the **motivation** for making this change. What existing problem does the pull request solve? I had tried fixing a broken link in a previous commit (facebook#11453). My commit was merged, but it did not resolve the underlying problem. I have looked into how links should be formed for the docs and have fixed the original problem as well as updated all other links to be consistent. Previous link formats: - /docs/sample.html <-- broken link - sample.html <-- broken link - https://facebook.github.io/react-native/docs/sample.html <-- works - /react-native/docs/sample.html <-- works - docs/sample.html <-- works (permalink format) This PR updates all links to the permalink format. **Test plan (required)** I ran the website locally and manually tested half of the links in each category. They all worked. ``` $ cd website $ npm install && npm start ``` Closes facebook#12064 Differential Revision: D4489153 Pulled By: mkonicek fbshipit-source-id: bf0231d941ba147317595c3b3466dc579a887169
1 parent 4344e06 commit 8378f0f

28 files changed

+56
-56
lines changed

Libraries/Alert/AlertIOS.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ type ButtonsArray = Array<{
100100
* );
101101
* ```
102102
*
103-
* We recommend using the [`Alert.alert`](alert.html) method for
103+
* We recommend using the [`Alert.alert`](docs/alert.html) method for
104104
* cross-platform support if you don't need to create iOS-only prompts.
105105
*
106106
*/

Libraries/CameraRoll/CameraRoll.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ var getPhotosReturnChecker = createStrictShapeTypeChecker({
111111
/**
112112
* `CameraRoll` provides access to the local camera roll / gallery.
113113
* Before using this you must link the `RCTCameraRoll` library.
114-
* You can refer to [Linking](https://facebook.github.io/react-native/docs/linking-libraries-ios.html) for help.
114+
* You can refer to [Linking](docs/linking-libraries-ios.html) for help.
115115
*
116116
* ### Permissions
117117
* The user's permission is required in order to access the Camera Roll on devices running iOS 10 or later.

Libraries/Components/Button.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const invariant = require('fbjs/lib/invariant');
2929
* <center><img src="img/buttonExample.png"></img></center>
3030
*
3131
* If this button doesn't look right for your app, you can build your own
32-
* button using [TouchableOpacity](https://facebook.github.io/react-native/docs/touchableopacity.html)
33-
* or [TouchableNativeFeedback](https://facebook.github.io/react-native/docs/touchablenativefeedback.html).
32+
* button using [TouchableOpacity](docs/touchableopacity.html)
33+
* or [TouchableNativeFeedback](docs/touchablenativefeedback.html).
3434
* For inspiration, look at the [source code for this button component](https://github.com/facebook/react-native/blob/master/Libraries/Components/Button.js).
3535
* Or, take a look at the [wide variety of button components built by the community](https://js.coach/react-native?search=button).
3636
*

Libraries/Components/Navigation/NavigatorIOS.ios.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ type Event = Object;
133133
* animations and behavior from UIKIt.
134134
*
135135
* As the name implies, it is only available on iOS. Take a look at
136-
* [`Navigator`](/react-native/docs/navigator.html) for a similar solution for your
136+
* [`Navigator`](docs/navigator.html) for a similar solution for your
137137
* cross-platform needs, or check out
138138
* [react-native-navigation](https://github.com/wix/react-native-navigation), a
139139
* component that aims to provide native navigation on both iOS and Android.

Libraries/Components/TextInput/TextInput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ const TextInput = React.createClass({
482482
* see [Issue#7070](https://github.com/facebook/react-native/issues/7070)
483483
* for more detail.
484484
*
485-
* [Styles](/react-native/docs/style.html)
485+
* [Styles](docs/style.html)
486486
*/
487487
style: Text.propTypes.style,
488488
/**

Libraries/Components/View/View.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ const statics = {
7676

7777
/**
7878
* The most fundamental component for building a UI, `View` is a container that supports layout with
79-
* [flexbox](/react-native/docs/flexbox.html), [style](/react-native/docs/style.html),
80-
* [some touch handling](/react-native/docs/handling-touches.html), and
81-
* [accessibility](/react-native/docs/accessibility.html) controls. `View` maps directly to the
79+
* [flexbox](docs/flexbox.html), [style](docs/style.html),
80+
* [some touch handling](docs/handling-touches.html), and
81+
* [accessibility](docs/accessibility.html) controls. `View` maps directly to the
8282
* native view equivalent on whatever platform React Native is running on, whether that is a
8383
* `UIView`, `<div>`, `android.view`, etc.
8484
*
@@ -101,7 +101,7 @@ const statics = {
101101
* }
102102
* ```
103103
*
104-
* > `View`s are designed to be used with [`StyleSheet`](/react-native/docs/style.html) for clarity
104+
* > `View`s are designed to be used with [`StyleSheet`](docs/style.html) for clarity
105105
* > and performance, although inline styles are also supported.
106106
*
107107
* ### Synthetic Touch Events
@@ -243,7 +243,7 @@ const View = React.createClass({
243243
* - `'allowsDirectInteraction'` - The element allows direct touch interaction for VoiceOver users.
244244
* - `'pageTurn'` - Informs VoiceOver that it should scroll to the next page when it finishes reading the contents of the element.
245245
*
246-
* See the [Accessibility guide](/react-native/docs/accessibility.html#accessibilitytraits-ios)
246+
* See the [Accessibility guide](docs/accessibility.html#accessibilitytraits-ios)
247247
* for more information.
248248
*
249249
* @platform ios

Libraries/CustomComponents/Navigator/Navigator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ var GESTURE_ACTIONS = [
289289
* ```
290290
* In the above example, the newly pushed scene will float up from the bottom.
291291
* See `Navigator.SceneConfigs` for default animations and more info on
292-
* available [scene config options](/react-native/docs/navigator.html#configurescene).
292+
* available [scene config options](docs/navigator.html#configurescene).
293293
*/
294294
var Navigator = React.createClass({
295295

Libraries/Text/Text.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ const Text = React.createClass({
185185
* for a `Text` element is `true`.
186186
*
187187
* See the
188-
* [Accessibility guide](/react-native/docs/accessibility.html#accessible-ios-android)
188+
* [Accessibility guide](docs/accessibility.html#accessible-ios-android)
189189
* for more information.
190190
*/
191191
accessible: PropTypes.bool,

docs/AndroidBuildingFromSource.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ gradle.projectsLoaded {
144144

145145
## Testing
146146

147-
If you made changes to React Native and submit a pull request, all tests will run on your pull request automatically. To run the tests locally, see [Testing](/react-native/docs/testing.html).
147+
If you made changes to React Native and submit a pull request, all tests will run on your pull request automatically. To run the tests locally, see [Testing](docs/testing.html).
148148

149149
## Troubleshooting
150150

docs/GettingStarted.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ next: tutorial
1010
Welcome to React Native! This page will help you install React Native on
1111
your system, so that you can build apps with it right away. If you already
1212
have React Native installed, you can skip ahead to the
13-
[Tutorial](/react-native/docs/tutorial.html).
13+
[Tutorial](docs/tutorial.html).
1414

1515
The instructions are a bit different depending on your development operating system, and whether you want to start developing for iOS or Android. If you
1616
want to develop for both iOS and Android, that's fine - you just have to pick

0 commit comments

Comments
 (0)