diff --git a/docs/gatsby-config.js b/docs/gatsby-config.js index ac639e259769..991541db04bd 100644 --- a/docs/gatsby-config.js +++ b/docs/gatsby-config.js @@ -8,19 +8,22 @@ module.exports = { docSections: { basics: [ '/basics/introduction/', - '/basics/quick-start-guide/', - '/basics/slow-start-guide/', - '/basics/guide-react/', - '/basics/guide-react-native/', - '/basics/guide-vue/', - '/basics/guide-angular/', - '/basics/guide-mithril/', - '/basics/guide-ember/', '/basics/writing-stories/', '/basics/exporting-storybook/', '/basics/faq/', '/basics/live-examples/', ], + guides: [ + '/guides/quick-start-guide/', + '/guides/slow-start-guide/', + '/guides/guide-react/', + '/guides/guide-react-native/', + '/guides/guide-vue/', + '/guides/guide-angular/', + '/guides/guide-mithril/', + '/guides/guide-ember/', + '/guides/guide-riot/', + ], configurations: [ '/configurations/options-parameter/', '/configurations/default-config/', diff --git a/docs/package.json b/docs/package.json index 7a99dfb2da8a..5e4c3c04b274 100644 --- a/docs/package.json +++ b/docs/package.json @@ -14,9 +14,7 @@ "build-storybook": "build-storybook", "dev": "gatsby develop", "serve": "gatsby serve", - "storybook": "start-storybook -p 9009 -s src/pages", - "snyk-protect": "snyk protect", - "prepare": "npm run snyk-protect" + "storybook": "start-storybook -p 9009 -s src/pages" }, "dependencies": { "@storybook/addon-actions": "5.0.0-rc.1", @@ -28,7 +26,7 @@ "common-tags": "^1.8.0", "gatsby": "^1.9.279", "gatsby-link": "^1.6.45", - "gatsby-plugin-sharp": "^2.0.12", + "gatsby-plugin-sharp": "^1.6.48", "gatsby-remark-autolink-headers": "^1.4.19", "gatsby-remark-copy-linked-files": "^1.5.37", "gatsby-remark-images": "^1.5.67", @@ -37,17 +35,21 @@ "gatsby-transformer-remark": "^1.7.44", "global": "^4.3.2", "highlight.js": "^9.14.2", + "is-builtin-module": "^3.0.0", "lodash": "^4.17.11", "marked": "^0.5.2", + "polished": "^3.0.3", "prop-types": "^15.7.2", - "react": "^15.6.2", + "react": "^16.8.3", "react-document-title": "^2.0.3", - "react-dom": "^15.6.2", + "react-dom": "^16.8.3", "react-helmet": "^5.2.0", + "react-popper-tooltip": "^2.8.1", "react-router": "^4.3.1", "react-stack-grid": "^0.7.1", + "recompose": "^0.30.0", "sitemap": "^2.1.0", - "snyk": "^1.134.2" - }, - "snyk": true + "styled-components": "^4.1.3", + "validatorjs": "^3.15.1" + } } diff --git a/docs/src/components/Docs/Container/index.js b/docs/src/components/Docs/Container/index.js index a305356d106c..bfa7e43c216e 100644 --- a/docs/src/components/Docs/Container/index.js +++ b/docs/src/components/Docs/Container/index.js @@ -1,5 +1,6 @@ +import { window } from 'global'; import PropTypes from 'prop-types'; -import React from 'react'; +import React, { Component } from 'react'; import Nav from '../Nav'; import NavDropdown from '../Nav/dropdown'; import Content from '../Content'; @@ -12,9 +13,33 @@ const getEditUrl = (selectedSectionId, selectedItemId) => { return `${gitHubRepoUrl}/blob/master/docs/src/pages/${docPath}/index.md`; }; +class Search extends Component { + componentDidMount() { + window.docsearch({ + apiKey: 'a4f7f972f1d8f99a66e237e7fd2e489f', + indexName: 'storybook-js', + inputSelector: '#search', + debug: false, + }); + } + + render() { + return ( +
{JSON.stringify(data, null, 2)}+ )); +``` + ## NPM Modules You can use any of the NPM modules installed on your project. diff --git a/docs/src/pages/configurations/standalone-options/index.md b/docs/src/pages/configurations/standalone-options/index.md index baf61721519e..ff5401c22906 100644 --- a/docs/src/pages/configurations/standalone-options/index.md +++ b/docs/src/pages/configurations/standalone-options/index.md @@ -27,7 +27,9 @@ storybook({ Mode is defining what Storybook mode will be applied: - dev - run Storybook in a dev mode - similar to "start-storybook" in CLI +### dev + +run Storybook in a dev mode - similar to `start-storybook` in CLI ```js const storybook = require('@storybook/react/standalone'); @@ -38,7 +40,9 @@ storybook({ }); ``` - static - build static version of Storybook - similar to "build-storybook" in CLI +### static + +build static version of Storybook - similar to `build-storybook` in CLI ```js const storybook = require('@storybook/react/standalone'); @@ -53,28 +57,29 @@ Other options are similar to those in the CLI. ## For "dev" mode: - Options: - - port [number] Port to run Storybook - host [string] Host to run Storybook - staticDir