Skip to content

Commit 64c41f2

Browse files
authored
Merge pull request facebook#8 from flarnie/gatsby
Fixing <s>some</s> *most* of the issues with links
2 parents 46cdbb4 + c3ac702 commit 64c41f2

File tree

8 files changed

+67
-59
lines changed

8 files changed

+67
-59
lines changed

docs/_data/nav_tutorial.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,89 +2,89 @@
22
items:
33
- id: tutorial
44
title: Before We Start
5-
href: /react/tutorial/tutorial.html#before-we-start
5+
href: /tutorial/tutorial.html#before-we-start
66
forceInternal: true
77
subitems:
8-
- id: what-were-building
8+
- id: what-were-building
99
title: What We're Building
10-
href: /react/tutorial/tutorial.html#what-were-building
10+
href: /tutorial/tutorial.html#what-were-building
1111
forceInternal: true
1212
- id: prerequisites
1313
title: Prerequisites
14-
href: /react/tutorial/tutorial.html#prerequisites
14+
href: /tutorial/tutorial.html#prerequisites
1515
forceInternal: true
1616
- id: how-to-follow-along
1717
title: How to Follow Along
18-
href: /react/tutorial/tutorial.html#how-to-follow-along
18+
href: /tutorial/tutorial.html#how-to-follow-along
1919
forceInternal: true
2020
- id: help-im-stuck
2121
title: Help, I'm Stuck!
22-
href: /react/tutorial/tutorial.html#help-im-stuck
22+
href: /tutorial/tutorial.html#help-im-stuck
2323
forceInternal: true
2424
- id: overview
2525
title: Overview
26-
href: /react/tutorial/tutorial.html#overview
26+
href: /tutorial/tutorial.html#overview
2727
forceInternal: true
2828
subitems:
2929
- id: what-is-react
3030
title: What is React?
31-
href: /react/tutorial/tutorial.html#what-is-react
31+
href: /tutorial/tutorial.html#what-is-react
3232
forceInternal: true
3333
- id: getting-started
3434
title: Getting Started
35-
href: /react/tutorial/tutorial.html#getting-started
35+
href: /tutorial/tutorial.html#getting-started
3636
forceInternal: true
3737
- id: passing-data-through-props
3838
title: Passing Data Through Props
39-
href: /react/tutorial/tutorial.html#passing-data-through-props
39+
href: /tutorial/tutorial.html#passing-data-through-props
4040
forceInternal: true
4141
- id: an-interactive-component
4242
title: An Interactive Component
43-
href: /react/tutorial/tutorial.html#an-interactive-component
43+
href: /tutorial/tutorial.html#an-interactive-component
4444
forceInternal: true
45-
- id: developer-tools
45+
- id: developer-tools
4646
title: Developer Tools
47-
href: /react/tutorial/tutorial.html#developer-tools
47+
href: /tutorial/tutorial.html#developer-tools
4848
forceInternal: true
4949
- id: lifting-state-up
5050
title: Lifting State Up
51-
href: /react/tutorial/tutorial.html#lifting-state-up
51+
href: /tutorial/tutorial.html#lifting-state-up
5252
forceInternal: true
5353
subitems:
54-
- id: why-immutability-is-important
54+
- id: why-immutability-is-important
5555
title: Why Immutability Is Important
56-
href: /react/tutorial/tutorial.html#why-immutability-is-important
56+
href: /tutorial/tutorial.html#why-immutability-is-important
5757
forceInternal: true
58-
- id: functional-components
58+
- id: functional-components
5959
title: Functional Components
60-
href: /react/tutorial/tutorial.html#functional-components
60+
href: /tutorial/tutorial.html#functional-components
6161
forceInternal: true
6262
- id: taking-turns
6363
title: Taking Turns
64-
href: /react/tutorial/tutorial.html#taking-turns
64+
href: /tutorial/tutorial.html#taking-turns
6565
forceInternal: true
6666
- id: declaring-a-winner
6767
title: Declaring a Winner
68-
href: /react/tutorial/tutorial.html#declaring-a-winner
68+
href: /tutorial/tutorial.html#declaring-a-winner
6969
forceInternal: true
7070
- id: storing-a-history
7171
title: Storing A History
72-
href: /react/tutorial/tutorial.html#storing-a-history
72+
href: /tutorial/tutorial.html#storing-a-history
7373
forceInternal: true
7474
subitems:
7575
- id: showing-the-moves
7676
title: Showing the Moves
77-
href: /react/tutorial/tutorial.html#showing-the-moves
77+
href: /tutorial/tutorial.html#showing-the-moves
7878
forceInternal: true
7979
- id: keys
8080
title: Keys
81-
href: /react/tutorial/tutorial.html#keys
81+
href: /tutorial/tutorial.html#keys
8282
forceInternal: true
83-
- id: implementing-time-travel
83+
- id: implementing-time-travel
8484
title: Implementing Time Travel
85-
href: /react/tutorial/tutorial.html#implementing-time-travel
85+
href: /tutorial/tutorial.html#implementing-time-travel
8686
forceInternal: true
8787
- id: wrapping-up
8888
title: Wrapping Up
89-
href: /react/tutorial/tutorial.html#wrapping-up
89+
href: /tutorial/tutorial.html#wrapping-up
9090
forceInternal: true

www/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"dependencies": {
99
"babel-standalone": "^6.26.0",
1010
"docsearch.js": "^2.4.1",
11-
"gatsby": "^1.8.16",
11+
"gatsby": "^1.9.9",
1212
"gatsby-link": "^1.6.9",
1313
"gatsby-plugin-glamor": "^1.6.4",
1414
"gatsby-plugin-google-analytics": "^1.0.4",

www/src/components/LayoutFooter/Footer.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,32 +41,32 @@ const Footer = () => (
4141
}}>
4242
<FooterNav>
4343
<FooterTitle>Docs</FooterTitle>
44-
<FooterLink to="#">Quick Start</FooterLink>
45-
<FooterLink to="#">Thinking in React</FooterLink>
46-
<FooterLink to="#">Tutorial</FooterLink>
47-
<FooterLink to="#">Advanced Guides</FooterLink>
44+
<FooterLink to="/docs/hello-world.html">Quick Start</FooterLink>
45+
<FooterLink to="/docs/thinking-in-react.html">Thinking in React</FooterLink>
46+
<FooterLink to="/tutorial/tutorial.html">Tutorial</FooterLink>
47+
<FooterLink to="/docs/jsx-in-depth.html">Advanced Guides</FooterLink>
4848
</FooterNav>
4949
<FooterNav>
5050
<FooterTitle>Community</FooterTitle>
51-
<FooterLink to="#">Stack Overflow</FooterLink>
52-
<FooterLink to="#">Discussion Forum</FooterLink>
53-
<FooterLink to="#">Reactiflux Chat</FooterLink>
54-
<FooterLink to="#">Facebook</FooterLink>
55-
<FooterLink to="#">Twitter</FooterLink>
51+
<FooterLink to="http://stackoverflow.com/questions/tagged/reactjs" target="_blank">Stack Overflow</FooterLink>
52+
<FooterLink to="https://discuss.reactjs.org" target="_blank">Discussion Forum</FooterLink>
53+
<FooterLink to="https://discord.gg/0ZcbPKXt5bZjGY5n" target="_blank">Reactiflux Chat</FooterLink>
54+
<FooterLink to="https://www.facebook.com/react" target="_blank">Facebook</FooterLink>
55+
<FooterLink to="https://twitter.com/reactjs" target="_blank">Twitter</FooterLink>
5656
</FooterNav>
5757
<FooterNav>
5858
<FooterTitle>Resources</FooterTitle>
59-
<FooterLink to="#">Conferences</FooterLink>
60-
<FooterLink to="#">Videos</FooterLink>
61-
<FooterLink to="#">Examples</FooterLink>
62-
<FooterLink to="#">Complementary Tools</FooterLink>
59+
<FooterLink to="/community/conferences.html">Conferences</FooterLink>
60+
<FooterLink to="/community/videos.html">Videos</FooterLink>
61+
<FooterLink to="https://github.com/facebook/react/wiki/Examples" target="_blank">Examples</FooterLink>
62+
<FooterLink to="https://github.com/facebook/react/wiki/Complementary-Tools" target="_blank">Complementary Tools</FooterLink>
6363
</FooterNav>
6464
<FooterNav>
6565
<FooterTitle>More</FooterTitle>
66-
<FooterLink to="#">Blog</FooterLink>
67-
<FooterLink to="#">GitHub</FooterLink>
68-
<FooterLink to="#">React Native</FooterLink>
69-
<FooterLink to="#">Acknowledgements</FooterLink>
66+
<FooterLink to="/blog.html">Blog</FooterLink>
67+
<FooterLink to="https://github.com/facebook/react" target="_blank">GitHub</FooterLink>
68+
<FooterLink to="http://facebook.github.io/react-native/" target="_blank">React Native</FooterLink>
69+
<FooterLink to="/acknowledgements.html">Acknowledgements</FooterLink>
7070
</FooterNav>
7171
<section
7272
css={{
@@ -80,7 +80,7 @@ const Footer = () => (
8080
paddingTop: 40,
8181
},
8282
}}>
83-
<a href="https://code.facebook.com/projects/">
83+
<a href="https://code.facebook.com/projects/" target="_blank">
8484
<img
8585
alt="Facebook Open Source"
8686
css={{

www/src/components/LayoutFooter/FooterLink.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import React from 'react';
1515
import {colors} from 'theme';
1616

17-
const FooterLink = ({children, to}) => (
17+
const FooterLink = ({children, target, to}) => (
1818
<a
1919
css={{
2020
fontWeight: 300,
@@ -23,7 +23,8 @@ const FooterLink = ({children, to}) => (
2323
color: colors.brand,
2424
},
2525
}}
26-
href={to}>
26+
href={to}
27+
target={target}>
2728
{children}
2829
</a>
2930
);

www/src/templates/components/Sidebar/Section.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const CreateLink = (section, item) => {
112112
return (
113113
<Link
114114
css={[linkCss, isItemActive(item) && activeLinkCss]}
115-
to={toAnchor(item.href)}>
115+
to={item.href}>
116116
{item.title}
117117
</Link>
118118
);

www/src/theme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ const sharedStyles = {
174174
},
175175

176176
'& h3': {
177-
marginTop: 45,
177+
paddingTop: 45,
178178

179179
[media.xlargeUp]: {
180180
fontSize: 25,

www/src/utils/slugify.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ import slugify from 'underscore.string/slugify';
1616
export default (string, directory) => {
1717
const filename = slugify(string) + '.html';
1818

19-
return directory ? `../${directory}/${filename}` : filename;
19+
return directory ? `/${directory}/${filename}` : filename;
2020
};

www/yarn.lock

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ babel-register@^6.24.1:
10781078
mkdirp "^0.5.1"
10791079
source-map-support "^0.4.2"
10801080

1081-
babel-runtime@6.26.0:
1081+
babel-runtime@6.26.0, babel-runtime@^6.26.0:
10821082
version "6.26.0"
10831083
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
10841084
dependencies:
@@ -3298,6 +3298,13 @@ gatsby-link@^1.6.9:
32983298
prop-types "^15.5.8"
32993299
ric "^1.3.0"
33003300

3301+
gatsby-module-loader@^1.0.4:
3302+
version "1.0.4"
3303+
resolved "https://registry.yarnpkg.com/gatsby-module-loader/-/gatsby-module-loader-1.0.4.tgz#f9cf32a255430f16807320252d73126f8567c697"
3304+
dependencies:
3305+
babel-runtime "^6.26.0"
3306+
loader-utils "^0.2.16"
3307+
33013308
gatsby-plugin-glamor@^1.6.4:
33023309
version "1.6.4"
33033310
resolved "https://registry.yarnpkg.com/gatsby-plugin-glamor/-/gatsby-plugin-glamor-1.6.4.tgz#43cdcab55fe381a6ef791157182ef24c78d59033"
@@ -3450,9 +3457,9 @@ gatsby-transformer-sharp@^1.6.1:
34503457
fs-extra "^4.0.0"
34513458
image-size "^0.6.0"
34523459

3453-
gatsby@^1.8.16:
3454-
version "1.8.16"
3455-
resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.8.16.tgz#76662e7572b37e785a87701b62e094ea4a5581bb"
3460+
gatsby@^1.9.9:
3461+
version "1.9.10"
3462+
resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.10.tgz#ef0f66aefd34c21ac42b2edf69eb03f9ab88aa78"
34563463
dependencies:
34573464
async "^2.1.2"
34583465
babel-code-frame "^6.22.0"
@@ -3494,10 +3501,11 @@ gatsby@^1.8.16:
34943501
friendly-errors-webpack-plugin "^1.6.1"
34953502
front-matter "^2.1.0"
34963503
fs-extra "^3.0.1"
3504+
gatsby-module-loader "^1.0.4"
34973505
glob "^7.1.1"
34983506
graphql "^0.10.3"
34993507
graphql-relay "^0.5.1"
3500-
graphql-skip-limit "^1.0.2"
3508+
graphql-skip-limit "^1.0.3"
35013509
gray-matter "^2.1.0"
35023510
hapi "^8.5.1"
35033511
history "^4.6.2"
@@ -3509,7 +3517,6 @@ gatsby@^1.8.16:
35093517
json-loader "^0.5.2"
35103518
json-stringify-safe "^5.0.1"
35113519
json5 "^0.5.0"
3512-
loader-utils "^0.2.16"
35133520
lodash "^4.17.4"
35143521
lodash-id "^0.14.0"
35153522
lowdb "^0.16.2"
@@ -3827,9 +3834,9 @@ graphql-relay@^0.5.1:
38273834
version "0.5.2"
38283835
resolved "https://registry.yarnpkg.com/graphql-relay/-/graphql-relay-0.5.2.tgz#40ff714efd60c2cd89e0bcc79e2afa6d87fa8673"
38293836

3830-
graphql-skip-limit@^1.0.2:
3831-
version "1.0.2"
3832-
resolved "https://registry.yarnpkg.com/graphql-skip-limit/-/graphql-skip-limit-1.0.2.tgz#9b72600ae9ccdecbe3a4edf521e51b14d63f979b"
3837+
graphql-skip-limit@^1.0.3:
3838+
version "1.0.3"
3839+
resolved "https://registry.yarnpkg.com/graphql-skip-limit/-/graphql-skip-limit-1.0.3.tgz#0809c6862ec1f589f7312c3a69d3fcb9232ad7c1"
38333840
dependencies:
38343841
babel-runtime "6.26.0"
38353842

0 commit comments

Comments
 (0)