diff --git a/docs/gatsby-config.js b/docs/gatsby-config.js index 3d7a650a..bc7c218a 100644 --- a/docs/gatsby-config.js +++ b/docs/gatsby-config.js @@ -8,6 +8,7 @@ module.exports = { title: `Octokit.js` }, plugins: [ + `gatsby-plugin-react-helmet`, `gatsby-source-octokit-routes`, { resolve: `gatsby-source-filesystem`, diff --git a/docs/package-lock.json b/docs/package-lock.json index 9b9160c4..9e69daea 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -4587,6 +4587,11 @@ "strip-eof": "^1.0.0" } }, + "exenv": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", + "integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=" + }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -5226,7 +5231,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -5244,11 +5250,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5261,15 +5269,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -5372,7 +5383,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -5382,6 +5394,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5394,17 +5407,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -5421,6 +5437,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -5493,7 +5510,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -5503,6 +5521,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -5578,7 +5597,8 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -5608,6 +5628,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -5625,6 +5646,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -5663,11 +5685,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true + "bundled": true, + "optional": true } } }, @@ -6002,6 +6026,14 @@ "slash": "^1.0.0" } }, + "gatsby-plugin-react-helmet": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/gatsby-plugin-react-helmet/-/gatsby-plugin-react-helmet-3.0.12.tgz", + "integrity": "sha512-x1DXKceTuEDePN9HcQymzQ+oBgmT3PKVQLSFbxrOECiC71cQRp03FJK0i/ClAkMJ3IJNLCGJDvi7dKydkc6dvw==", + "requires": { + "@babel/runtime": "^7.0.0" + } + }, "gatsby-plugin-typography": { "version": "2.2.13", "resolved": "https://registry.npmjs.org/gatsby-plugin-typography/-/gatsby-plugin-typography-2.2.13.tgz", @@ -10305,6 +10337,17 @@ "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-3.0.0.tgz", "integrity": "sha512-XzgvowFrwDo6TWcpJ/WTiarb9UI6lhA4PMzS7n1joK3sHfBBBOQHUc0U4u57D6DWO9vHv6lVSWx2Q/Ymfyv4hw==" }, + "react-helmet": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/react-helmet/-/react-helmet-5.2.0.tgz", + "integrity": "sha1-qBgR3yExOm1VxfBYxK66XW89l6c=", + "requires": { + "deep-equal": "^1.0.1", + "object-assign": "^4.1.1", + "prop-types": "^15.5.4", + "react-side-effect": "^1.1.0" + } + }, "react-hot-loader": { "version": "4.8.3", "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.8.3.tgz", @@ -10338,6 +10381,15 @@ "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" }, + "react-side-effect": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-1.1.5.tgz", + "integrity": "sha512-Z2ZJE4p/jIfvUpiUMRydEVpQRf2f8GMHczT6qLcARmX7QRb28JDBTpnM2g/i5y/p7ZDEXYGHWg0RbhikE+hJRw==", + "requires": { + "exenv": "^1.2.1", + "shallowequal": "^1.0.1" + } + }, "react-typography": { "version": "0.16.19", "resolved": "https://registry.npmjs.org/react-typography/-/react-typography-0.16.19.tgz", diff --git a/docs/package.json b/docs/package.json index a329abc3..acace4e2 100644 --- a/docs/package.json +++ b/docs/package.json @@ -11,6 +11,7 @@ "dependencies": { "@gatsby-contrib/gatsby-plugin-elasticlunr-search": "^2.2.1", "gatsby": "^2.3.22", + "gatsby-plugin-react-helmet": "^3.0.12", "gatsby-plugin-typography": "^2.2.6", "gatsby-remark-prismjs": "^3.2.6", "gatsby-source-filesystem": "^2.0.28", @@ -20,6 +21,7 @@ "prismjs": "^1.16.0", "react": "^16.8.6", "react-dom": "^16.8.6", + "react-helmet": "^5.2.0", "react-typography": "^0.16.18", "typography": "^0.16.18", "typography-theme-fairy-gates": "^0.15.11" diff --git a/docs/src/components/endpoint.js b/docs/src/components/endpoint.js index e2566072..eee3302b 100644 --- a/docs/src/components/endpoint.js +++ b/docs/src/components/endpoint.js @@ -66,11 +66,13 @@ export default class EndPoint extends Component { return {param.name} {param.required ? 'yes' : 'no'} - {param.description} + })} + + See also: GitHub Developer Guide documentation. ) diff --git a/docs/src/components/layout.css b/docs/src/components/layout.css index e08df792..54098263 100644 --- a/docs/src/components/layout.css +++ b/docs/src/components/layout.css @@ -32,7 +32,7 @@ header h1 { } header > .search { - grid-column: 1/2; + grid-column: 1/3; grid-row: 1/2; --whitespace: 1.25rem; width: 100%; @@ -40,10 +40,6 @@ header > .search { z-index: 1; } -header > .search.active { - grid-column: 1/-1; -} - header > .search .input { background: #272822; color: #fff; @@ -128,6 +124,10 @@ header > button:focus { /* Hide the navigation toggle button on big screens, since it’s not needed */ @media (min-width: 55em) { /* --wide-enough-for-two-columns */ + header > .search { + grid-column: 1/-1; + } + header button { display: none !important; } diff --git a/docs/src/components/layout.js b/docs/src/components/layout.js index 268693f5..8820b339 100644 --- a/docs/src/components/layout.js +++ b/docs/src/components/layout.js @@ -2,23 +2,7 @@ import React, { Component } from 'react' class Layout extends Component { render() { - return ( - - - - - - - - - octokit/rest.js - - - - {this.props.children} - - - ) + return this.props.children } } diff --git a/docs/src/pages/index.js b/docs/src/pages/index.js index 4dba4bb7..9fd4172f 100644 --- a/docs/src/pages/index.js +++ b/docs/src/pages/index.js @@ -1,4 +1,5 @@ import React from 'react' +import { Helmet } from "react-helmet" import Layout from '../components/layout' import { graphql } from 'gatsby' @@ -7,6 +8,10 @@ import IndexPage from "../components/index-page" export default ({ data }) => ( + + + octokit/rest.js + )