Skip to content

Commit 4ccc311

Browse files
committed
docs: replace html.js with react-helmet
html.js seems to be unnecessary. Other than changing <html> lang attribute, it also seems to be adding a Codepen script which I think was from an older version of the docs which used Codepen instead of CodeSandbox.
1 parent b39b9f8 commit 4ccc311

File tree

5 files changed

+53
-37
lines changed

5 files changed

+53
-37
lines changed

www/gatsby-config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports = {
2424
],
2525
},
2626
plugins: [
27+
'gatsby-plugin-react-helmet',
2728
{
2829
resolve: 'gatsby-source-filesystem',
2930
options: {

www/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"babel-preset-gatsby": "^0.1.8",
1818
"bootstrap": "^4.3.1",
1919
"gatsby": "^2.1.22",
20+
"gatsby-plugin-react-helmet": "^3.0.10",
2021
"gatsby-plugin-sass": "^2.0.10",
2122
"gatsby-remark-prismjs": "^3.2.4",
2223
"gatsby-source-filesystem": "^2.0.23",
@@ -26,7 +27,8 @@
2627
"prismjs": "^1.15.0",
2728
"react": "^16.8.3",
2829
"react-bootstrap": "^1.0.0-beta.5",
29-
"react-dom": "^16.8.3"
30+
"react-dom": "^16.8.3",
31+
"react-helmet": "^5.2.0"
3032
},
3133
"devDependencies": {
3234
"gh-pages": "^2.0.1",

www/src/components/Layout.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { graphql, Link } from 'gatsby';
22
import PropTypes from 'prop-types';
33
import React from 'react';
4+
import Helmet from 'react-helmet';
45

56
import { Navbar, Nav } from 'react-bootstrap';
67

@@ -27,6 +28,9 @@ const propTypes = {
2728

2829
const Layout = ({ data, children }) => (
2930
<>
31+
<Helmet>
32+
<html lang="en" />
33+
</Helmet>
3034
<Navbar fixed="top" bg="dark" variant="dark" expand="md" collapseOnSelect>
3135
<Navbar.Brand as={Link} to="/">
3236
React Transition Group

www/src/html.js

Lines changed: 0 additions & 35 deletions
This file was deleted.

www/yarn.lock

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3655,6 +3655,11 @@ execa@^1.0.0:
36553655
signal-exit "^3.0.0"
36563656
strip-eof "^1.0.0"
36573657

3658+
exenv@^1.2.1:
3659+
version "1.2.2"
3660+
resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d"
3661+
integrity sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=
3662+
36583663
expand-brackets@^2.1.4:
36593664
version "2.1.4"
36603665
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
@@ -4207,6 +4212,13 @@ gatsby-plugin-page-creator@^2.0.8:
42074212
parse-filepath "^1.0.1"
42084213
slash "^1.0.0"
42094214

4215+
gatsby-plugin-react-helmet@^3.0.10:
4216+
version "3.0.10"
4217+
resolved "https://registry.yarnpkg.com/gatsby-plugin-react-helmet/-/gatsby-plugin-react-helmet-3.0.10.tgz#08a4f3f7d6ffd020d78817679535fb6548602302"
4218+
integrity sha512-YqxPNqfIS/xu+5ZO4URzWiszM6YqlyY1Xq8vvji0V/iP3XGDeQmABfFAoyd8vzAsQsWxIBDgTT2nxbBfLr7eSA==
4219+
dependencies:
4220+
"@babel/runtime" "^7.0.0"
4221+
42104222
gatsby-plugin-sass@^2.0.10:
42114223
version "2.0.10"
42124224
resolved "https://registry.yarnpkg.com/gatsby-plugin-sass/-/gatsby-plugin-sass-2.0.10.tgz#576c034c40ae007cb364ec3b19619dc12e62acae"
@@ -7828,6 +7840,15 @@ prop-types-extra@^1.1.0:
78287840
react-is "^16.3.2"
78297841
warning "^3.0.0"
78307842

7843+
prop-types@^15.5.4:
7844+
version "15.7.2"
7845+
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
7846+
integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
7847+
dependencies:
7848+
loose-envify "^1.4.0"
7849+
object-assign "^4.1.1"
7850+
react-is "^16.8.1"
7851+
78317852
prop-types@^15.6.1, prop-types@^15.6.2:
78327853
version "15.6.2"
78337854
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102"
@@ -8068,6 +8089,16 @@ react-error-overlay@^3.0.0:
80688089
version "3.0.0"
80698090
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-3.0.0.tgz#c2bc8f4d91f1375b3dad6d75265d51cd5eeaf655"
80708091

8092+
react-helmet@^5.2.0:
8093+
version "5.2.0"
8094+
resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-5.2.0.tgz#a81811df21313a6d55c5f058c4aeba5d6f3d97a7"
8095+
integrity sha1-qBgR3yExOm1VxfBYxK66XW89l6c=
8096+
dependencies:
8097+
deep-equal "^1.0.1"
8098+
object-assign "^4.1.1"
8099+
prop-types "^15.5.4"
8100+
react-side-effect "^1.1.0"
8101+
80718102
react-hot-loader@^4.6.2:
80728103
version "4.7.2"
80738104
resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.7.2.tgz#54cd99441c2d594bdc58c90673690c245dcfcaff"
@@ -8088,6 +8119,11 @@ react-is@^16.3.2, react-is@^16.7.0:
80888119
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.3.tgz#4ad8b029c2a718fc0cfc746c8d4e1b7221e5387d"
80898120
integrity sha512-Y4rC1ZJmsxxkkPuMLwvKvlL1Zfpbcu+Bf4ZigkHup3v9EfdYhAlWAaVyA19olXq2o2mGn0w+dFKvk3pVVlYcIA==
80908121

8122+
react-is@^16.8.1:
8123+
version "16.8.5"
8124+
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.5.tgz#c54ac229dd66b5afe0de5acbe47647c3da692ff8"
8125+
integrity sha512-sudt2uq5P/2TznPV4Wtdi+Lnq3yaYW8LfvPKLM9BKD8jJNBkxMVyB0C9/GmVhLw7Jbdmndk/73n7XQGeN9A3QQ==
8126+
80918127
react-lifecycles-compat@^3.0.4:
80928128
version "3.0.4"
80938129
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
@@ -8124,6 +8160,14 @@ react-prop-types@^0.4.0:
81248160
dependencies:
81258161
warning "^3.0.0"
81268162

8163+
react-side-effect@^1.1.0:
8164+
version "1.1.5"
8165+
resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-1.1.5.tgz#f26059e50ed9c626d91d661b9f3c8bb38cd0ff2d"
8166+
integrity sha512-Z2ZJE4p/jIfvUpiUMRydEVpQRf2f8GMHczT6qLcARmX7QRb28JDBTpnM2g/i5y/p7ZDEXYGHWg0RbhikE+hJRw==
8167+
dependencies:
8168+
exenv "^1.2.1"
8169+
shallowequal "^1.0.1"
8170+
81278171
react-transition-group@^2.5.1:
81288172
version "2.6.0"
81298173
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.6.0.tgz#3c41cbdd9c044c5f8604d4e8d319e860919c9fae"
@@ -8915,7 +8959,7 @@ shallow-compare@^1.2.2:
89158959
version "1.2.2"
89168960
resolved "https://registry.yarnpkg.com/shallow-compare/-/shallow-compare-1.2.2.tgz#fa4794627bf455a47c4f56881d8a6132d581ffdb"
89178961

8918-
shallowequal@^1.0.2:
8962+
shallowequal@^1.0.1, shallowequal@^1.0.2:
89198963
version "1.1.0"
89208964
resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"
89218965

0 commit comments

Comments
 (0)