From 89695028b3f7ec8a70bb53d2c42acbbb49eef27d Mon Sep 17 00:00:00 2001 From: Danny Hurlburt Date: Wed, 3 Apr 2019 11:20:37 -0600 Subject: [PATCH] Make into Two Words (#13084) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(gatsby-source-shopify): Add note about API permissions (#13037) Note which permissions you should enable on the Shopify Storefront API. Without these permissions you'll get a fairly cryptic error message. * chore(docs): match the Wording Style of Other Tutorial Parts (#13034) * chore(docs): fix typo in convincing others doc (#13033) ## Description Fixes a misspelled word. * fix(docs): expand guidelist on partnering with gatsby page (#13029) Following up on #12970. Current https://www.gatsbyjs.org/docs/partnering-with-gatsby/: ![image](https://user-images.githubusercontent.com/21834/55404445-2f445080-5558-11e9-84d8-f75db8dd7297.png) * fix(starters): update gatsby monorepo (#12925) This PR contains the following updates: | Package | Type | Update | Change | References | |---|---|---|---|---| | gatsby | dependencies | patch | [`^2.3.3` -> `^2.3.5`](https://diff.intrinsic.com/gatsby/2.3.3/2.3.5) | [source](https://togithub.com/gatsbyjs/gatsby) | | gatsby-image | dependencies | patch | [`^2.0.35` -> `^2.0.37`](https://diff.intrinsic.com/gatsby-image/2.0.35/2.0.37) | [source](https://togithub.com/gatsbyjs/gatsby) | | gatsby-plugin-manifest | dependencies | patch | [`^2.0.25` -> `^2.0.26`](https://diff.intrinsic.com/gatsby-plugin-manifest/2.0.25/2.0.26) | [source](https://togithub.com/gatsbyjs/gatsby) | --- ### Release Notes
gatsbyjs/gatsby ### [`v2.3.5`](https://togithub.com/gatsbyjs/gatsby/compare/gatsby@2.3.4...gatsby@2.3.5) [Compare Source](https://togithub.com/gatsbyjs/gatsby/compare/gatsby@2.3.4...gatsby@2.3.5) ### [`v2.3.4`](https://togithub.com/gatsbyjs/gatsby/compare/gatsby@2.3.3...gatsby@2.3.4) [Compare Source](https://togithub.com/gatsbyjs/gatsby/compare/gatsby@2.3.3...gatsby@2.3.4)
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or if you modify the PR title to begin with "`rebase!`". :ghost: **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/config-help/issues) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/marketplace/renovate). View repository job log [here](https://renovatebot.com/dashboard#gatsbyjs/gatsby). * feat(blog): add gatsby is great blog post (#12777) * chore: add blog post * chore: keep iterating * chore: more tweaks * feat: nearly finish up * chore: run tinypng * chore: fix some typos * chore: fix snippet * chore: add a gif, it gets the people going * chore: more * Update docs/blog/2019-03-25-behind-the-scenes-what-makes-gatsby-great/index.md Co-Authored-By: DSchau * Update docs/blog/2019-03-25-behind-the-scenes-what-makes-gatsby-great/index.md Co-Authored-By: DSchau * Update docs/blog/2019-03-25-behind-the-scenes-what-makes-gatsby-great/index.md Co-Authored-By: DSchau * Update docs/blog/2019-03-25-behind-the-scenes-what-makes-gatsby-great/index.md Co-Authored-By: DSchau * Update docs/blog/2019-03-25-behind-the-scenes-what-makes-gatsby-great/index.md Co-Authored-By: DSchau * Update docs/blog/2019-03-25-behind-the-scenes-what-makes-gatsby-great/index.md Co-Authored-By: DSchau * Update docs/blog/2019-03-25-behind-the-scenes-what-makes-gatsby-great/index.md Co-Authored-By: DSchau * Update docs/blog/2019-03-25-behind-the-scenes-what-makes-gatsby-great/index.md Co-Authored-By: DSchau * Update docs/blog/2019-03-25-behind-the-scenes-what-makes-gatsby-great/index.md Co-Authored-By: DSchau * Update docs/blog/2019-03-25-behind-the-scenes-what-makes-gatsby-great/index.md Co-Authored-By: DSchau * Update docs/blog/2019-03-25-behind-the-scenes-what-makes-gatsby-great/index.md Co-Authored-By: DSchau * chore: change date * chore: tighten up last section * chore: change data * chore: update per feedback * chore(docs): replace absolute links with relative links (#12949) ## Description Suggest a more complete structure to the example gatsby-config.js file ## Related Issues Along with https://github.com/gatsbyjs/gatsby/pull/12103 this PR fixes #11957 * chore(showcase): Add Assortment to site showcase (#13002) ## Description Adding [assortment.io](https://assortment.io) to site showcase. Assortment is my Web Development blog that I've recently updated to Gatsby, Netlify, Netlify CMS and Emotion. It'd be cool to see it on the showcase 😃 * feat(gatsby-dev-cli): add verdaccio support (#11525) * feat(gatsby-dev-cli): add verdaccio support [wip] * yuck - don't look * just to verify verdaccio * fix gitignore and add htpasswd with dummy gatsby-dev user * some logging to understand why it tries to handle all the packages * just temporarily so it hopefully at least works * moar data * don't copy all the packages right now * don't rely on package name starting with "gatsby" heuristic * tmp commit * tmp * fs change * tmp * a * updates * remove random files that shouldn't be here * tmp * revert dep changes * ignore changes to package.json created during publishing * testing of dep change in gatsby-cli is picked up by gatsby-dev-cli * let's see if gatsby-dev will handle case of no node_modules * sanity check * adjust console message * add missing devDeps * more missing devDeps * grab package.json from unpkg if package is not yet installed locally * correctly ignore package.json changes during publishing * cleaning things up * htpasswd loc * restore gatsby package.json * adjust ignore files * gatsby-dev-cli: ignore tests * remove extra ln * less console output * turns out you don't need htpasswd after all * use exact when installing local packages - timestamp is used in version * why it failed? * use yarn for publishing - see https://github.com/verdaccio/verdaccio/issues/997 * v0.1.1 * add temporary .npmrc file to allow anonymous publishes * add some jsdocs * update yarn.lock * oops * debug why still can't publish anon * adjust npmrc content * doh * Revert "debug why still can't publish anon" This reverts commit fc1045adde896673e94e77b7cb72890c78e32fb4. * handle package installation of deps didn't change * skip version changes for packages in gatsby mono-repo, queue copying instead of doing it immediately * fix tests * packages stored in verdaccio storage seems to be picked up by jest and causing trouble, so let's ignore verdaccio storage directory * bye "wat", you will be missed * bail early to avoid conditional bracket hell * more bailing early * more concise * new line * use exaca to simplify running yarn * clean up www/.gitignore * handle not existing packages * remove unused (was needed for basic auth) * cleanup temp file changes when process exit in middle of publishing * ops * Apply suggestions from code review Co-Authored-By: pieh * cleanup unpkg response handler * move stuff around * remove tmp comment * document traversePackageDocs fn * restrcuture files * add basic tests for traversingPackageDeps * add basic tests for generating packages to publish (based on dep graph) * fix tests on windows * handle circular dependencies when constructing list of packages to publish * remove cat ;( * restore original e2e-test script * update gitignore * chore(release): Publish - babel-plugin-remove-graphql-queries@2.6.3 - babel-preset-gatsby@0.1.11 - gatsby-dev-cli@2.4.13 - gatsby-plugin-typescript@2.0.12 - gatsby-source-shopify@2.0.23 - gatsby@2.3.6 * chore(release): Publish - gatsby-dev-cli@2.4.14 * docs(gatsby-dev-cli): Edit README (#13049) * Build out Gatsby media information in docs (#12906) * add video info, delete unnecessary stubs Related to https://github.com/gatsbyjs/gatsby/issues/12903 * fix internal link for html5 video section * update videoTitle example Co-Authored-By: marcysutton * Apply suggestions from code review thanks for the feedback! Co-Authored-By: marcysutton * incorporate feedback, make into real docs!! * delete unused stubs * Update docs/docs/working-with-video.md Co-Authored-By: marcysutton * Update docs/docs/working-with-video.md Co-Authored-By: marcysutton * chore(gatsby): fix domready package to be compatible with ie10 (#13027) * changed domready package to domready-loaded which is compatible with ie10 * updated domready to @mikaelkristiansson/domready * updated packages/gatsby to use @mikaelkristiansson/domready * chore(release): Publish - gatsby@2.3.7 * feat(gatsby-transformer-react-docgen): use local babel config for react-docgen (#12001) * feat: use local babel config for react-docgen BREAKING CHANGE: now uses the local babel config with a fallback * Update README.md * chore(release): Publish - gatsby-transformer-react-docgen@4.0.0 * chore(docs): add “Why I used GatsbyJS (#12954) Why I used GatsbyJS ## Description ## Related Issues * feat(www): don't check for overview frontmatter (#13060) Fixes `[[guidelist]]` not being replaced in few pages (i.e. in https://www.gatsbyjs.org/docs/winning-over-stakeholders/ ) The code is handling cases when there are no children (tried building locally and it worked just fine). Follow up to this would be to clear `.md` files that use `overview` and adjust page query. But this is just quick fix. * chore(docs): add starter library to docs sidebar under starters (#12963) 40% of people visiting the starters page go here next, so we should probably add this: ![image](https://user-images.githubusercontent.com/4388699/55285012-58d26180-5337-11e9-9259-68e81b4894ad.png) * chore(showcase): Add gmartinez.dev to showcase (#13067) ## Description Adding gmartinez.dev to showcase list in site.yml Co-authored-by: Lennart * fix(gatsby): don't try to statically analyze gatsby-node, require it and examine exports instead (#13053) * fix: don't try to statically analyze gatsby-node, require it and examine exports instead * differentiate test names * Update packages/gatsby/src/bootstrap/resolve-module-exports.js Co-Authored-By: pieh * chore(release): Publish - gatsby@2.3.8 * Use Loki's elemMatch operator (#13025) * feat(gatsby): add util.promisify polyfill for older node version (#13024) * refactor(gatsby): gatsby develop: cleanup port detection (#13006) * chore(release): Publish - gatsby@2.3.9 * fix(gatsby): ignore __esModule export in gatsby-node exports (#13081) I introduced bug/regression in https://github.com/gatsbyjs/gatsby/pull/13053 by not removing `__esModule` export name from resolved export names - it break some plugins Fixes: #13079 * chore(release): Publish - gatsby@2.3.10 * fix(www): Hubspot form UI (#13080) * fix(www): Work around HubSpot’s CSS being loaded …by pulling in react-hubspot-form locally, and modifying it slightly. See comment in `www/src/components/react-hubspot-form` for more info. * Fix `formInput` styles … now matching the reference homepage newsletter form — no more Futura PT for input text. * Return nothing because linter * Make into Two Words --- docs/docs/awesome-gatsby.md | 1 + .../dropping-images-into-static-folders.md | 9 - docs/docs/images-and-files.md | 4 +- docs/docs/importing-media-content.md | 26 +- docs/docs/importing-single-files.md | 9 - docs/docs/working-with-video.md | 142 + docs/sites.yml | 11 + docs/tutorial/part-six/index.md | 2 +- jest.config.js | 7 +- .../CHANGELOG.md | 6 + .../package.json | 5 +- packages/babel-preset-gatsby/CHANGELOG.md | 6 + packages/babel-preset-gatsby/package.json | 6 +- packages/gatsby-dev-cli/.gitignore | 3 + packages/gatsby-dev-cli/.npmignore | 1 + packages/gatsby-dev-cli/CHANGELOG.md | 10 + packages/gatsby-dev-cli/README.md | 2 +- packages/gatsby-dev-cli/package.json | 10 +- .../gatsby-dev-cli/src/__tests__/watch.js | 24 +- packages/gatsby-dev-cli/src/index.js | 14 +- .../src/local-npm-registry/cleanup-tasks.js | 19 + .../src/local-npm-registry/verdaccio.js | 239 ++ .../utils/__tests__/get-dependant-packages.js | 29 + .../utils/__tests__/traverse-package-deps.js | 68 + .../src/utils/check-deps-changes.js | 188 + .../src/utils/get-dependant-packages.js | 30 + .../utils/get-monorepo-package-json-path.js | 4 + .../src/utils/promisified-spawn.js | 12 + .../src/utils/traverse-package-deps.js | 83 + packages/gatsby-dev-cli/src/watch.js | 231 +- .../gatsby-plugin-typescript/CHANGELOG.md | 4 + .../gatsby-plugin-typescript/package.json | 4 +- packages/gatsby-source-shopify/CHANGELOG.md | 4 + packages/gatsby-source-shopify/package.json | 2 +- .../CHANGELOG.md | 12 + .../gatsby-transformer-react-docgen/README.md | 44 +- .../package.json | 4 +- .../__tests__/fixtures/babel-config/.babelrc | 1 + .../fixtures/babel-config/classes.js | 82 + .../src/__tests__/on-node-create.js | 15 +- .../src/parse.js | 10 +- packages/gatsby/CHANGELOG.md | 26 + packages/gatsby/cache-dir/app.js | 2 +- packages/gatsby/cache-dir/production-app.js | 2 +- packages/gatsby/package.json | 11 +- .../bootstrap/__mocks__/require/exports.js | 3 + .../__mocks__/require/unusual-exports.js | 9 + .../__tests__/resolve-module-exports.js | 42 +- packages/gatsby/src/bootstrap/index.js | 2 + .../src/bootstrap/load-plugins/validate.js | 5 +- .../src/bootstrap/resolve-module-exports.js | 35 +- packages/gatsby/src/commands/develop.js | 13 +- packages/gatsby/src/commands/serve.js | 6 +- packages/gatsby/src/db/loki/index.js | 2 +- packages/gatsby/src/db/loki/nodes-query.js | 61 +- .../utils/detect-port-in-use-and-prompt.js | 41 +- www/package.json | 1 - www/src/components/hubspot-form.js | 5 +- www/src/components/react-hubspot-form.js | 108 + www/src/data/sidebars/doc-links.yaml | 16 +- www/src/templates/template-docs-markdown.js | 4 - www/src/utils/styles.js | 4 +- yarn.lock | 3052 ++++++++++++++++- 63 files changed, 4537 insertions(+), 296 deletions(-) delete mode 100644 docs/docs/dropping-images-into-static-folders.md delete mode 100644 docs/docs/importing-single-files.md create mode 100644 docs/docs/working-with-video.md create mode 100644 packages/gatsby-dev-cli/src/local-npm-registry/cleanup-tasks.js create mode 100644 packages/gatsby-dev-cli/src/local-npm-registry/verdaccio.js create mode 100644 packages/gatsby-dev-cli/src/utils/__tests__/get-dependant-packages.js create mode 100644 packages/gatsby-dev-cli/src/utils/__tests__/traverse-package-deps.js create mode 100644 packages/gatsby-dev-cli/src/utils/check-deps-changes.js create mode 100644 packages/gatsby-dev-cli/src/utils/get-dependant-packages.js create mode 100644 packages/gatsby-dev-cli/src/utils/get-monorepo-package-json-path.js create mode 100644 packages/gatsby-dev-cli/src/utils/promisified-spawn.js create mode 100644 packages/gatsby-dev-cli/src/utils/traverse-package-deps.js create mode 100644 packages/gatsby-transformer-react-docgen/src/__tests__/fixtures/babel-config/.babelrc create mode 100644 packages/gatsby-transformer-react-docgen/src/__tests__/fixtures/babel-config/classes.js create mode 100644 packages/gatsby/src/bootstrap/__mocks__/require/exports.js create mode 100644 packages/gatsby/src/bootstrap/__mocks__/require/unusual-exports.js create mode 100644 www/src/components/react-hubspot-form.js diff --git a/docs/docs/awesome-gatsby.md b/docs/docs/awesome-gatsby.md index f20a32f63f83f..a515303328679 100644 --- a/docs/docs/awesome-gatsby.md +++ b/docs/docs/awesome-gatsby.md @@ -66,6 +66,7 @@ See the [library of official and community plugins](/plugins/) - [Zero to Deploy: A Practical Guide to Static Sites with Gatsby.js](https://scotch.io/tutorials/zero-to-deploy-a-practical-guide-to-static-sites-with-gatsbyjs) - [Build blazing fast web applications with Gatsby 101](https://gatsbyguides.com/) - [Build a Coffee Shop Website w/ Gatsby, Contentful, SnipCard & Formspree](https://www.youtube.com/watch?v=oAVhEPey_qA) +- [Why I used GatsbyJS](https://medium.com/@jameshunt.co/why-i-used-gatsbyjs-70bbb0f5c4a7) ### German diff --git a/docs/docs/dropping-images-into-static-folders.md b/docs/docs/dropping-images-into-static-folders.md deleted file mode 100644 index 7107bafc0157a..0000000000000 --- a/docs/docs/dropping-images-into-static-folders.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Dropping Images into Static Folders -issue: https://github.com/gatsbyjs/gatsby/issues/8103 ---- - -This is a stub. Help our community expand it. - -Please use the [Gatsby Style Guide](/contributing/gatsby-style-guide/) to ensure your -pull request gets accepted. diff --git a/docs/docs/images-and-files.md b/docs/docs/images-and-files.md index 26e90445b5140..13c4b49b15afc 100644 --- a/docs/docs/images-and-files.md +++ b/docs/docs/images-and-files.md @@ -1,8 +1,8 @@ --- -title: Images and Files +title: Images, Video, and Files overview: true --- -Gatsby provides multiple solutions for adding images and files into your projects. This section will walk you through several common patterns for handling images and files in Gatsby projects. +Gatsby provides multiple solutions for adding images, video, and files into your projects. This section will walk you through several common patterns for handling media in Gatsby projects. [[guidelist]] diff --git a/docs/docs/importing-media-content.md b/docs/docs/importing-media-content.md index 49937acce878d..81a8c3f23ff73 100644 --- a/docs/docs/importing-media-content.md +++ b/docs/docs/importing-media-content.md @@ -1,9 +1,25 @@ --- -title: Importing media content -issue: https://github.com/gatsbyjs/gatsby/issues/8103 +title: Importing Media Content --- -This is a stub. Help our community expand it. +"Media content" is a broad term that generally includes images, videos, documents and files that are displayed on your website. For Gatsby sites, you have multiple options for importing media content depending on the type: -Please use the [Gatsby Style Guide](/contributing/gatsby-style-guide/) to ensure your -pull request gets accepted. +## Images, SVG, and PDFs + +- [Image graphics can be imported](/docs/adding-images-fonts-files/) with Webpack and queried with GraphQL. +- Images can also be [included from the `static folder`](/docs/adding-images-fonts-files/#using-the-static-folder). +- SVG content can be embedded into JSX. Here's a [handy JSX converter](https://transform.now.sh/html-to-jsx/). +- SVG can be included in `img` tags or CSS backgrounds. [SVG Tips from CSS Tricks](https://css-tricks.com/using-svg/). +- For PDF files, we recommend embedding an [image of the PDF](https://helpx.adobe.com/acrobat/using/exporting-pdfs-file-formats.html) with [alternative text](https://a11y-101.com/development/infographics), and providing a link to download a [tagged PDF](https://helpx.adobe.com/acrobat/using/creating-accessible-pdfs.html). + +## Video assets + +Like images, video assets present many options and requirements for cross-browser support. Learn about video embeds on the Gatsby docs page on [working with video](/docs/working-with-video/). + +## Canvas and WebGL + +The HTML5 `` element provides a space for 2-dimensional drawing in a web environment. In Gatsby and React, it may help to include a library like [react-konva](https://github.com/konvajs/react-konva) or one of the comparison libraries to cut down on boilerplate and make drawing easier. + +[WebGL](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Getting_started_with_WebGL), on the other hand, creates a 3-dimensional space in a web environment using the `` element. Libraries like [Three.js](https://threejs.org/) are often used to enable WebGL experiences in React apps. + +> Using canvas and/or WebGL may require modifying your Webpack config. Do you have experience with making this work in your Gatsby site? Contribute to the docs by adding more details to this page. diff --git a/docs/docs/importing-single-files.md b/docs/docs/importing-single-files.md deleted file mode 100644 index 042393195c6aa..0000000000000 --- a/docs/docs/importing-single-files.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Importing single files -issue: https://github.com/gatsbyjs/gatsby/issues/8103 ---- - -This is a stub. Help our community expand it. - -Please use the [Gatsby Style Guide](/contributing/gatsby-style-guide/) to ensure your -pull request gets accepted. diff --git a/docs/docs/working-with-video.md b/docs/docs/working-with-video.md new file mode 100644 index 0000000000000..1c75b4d098893 --- /dev/null +++ b/docs/docs/working-with-video.md @@ -0,0 +1,142 @@ +--- +title: Working With Video +--- + +- [Sourcing video from a host](#sourcing-video-from-a-host) +- [Embedding hosted videos in Markdown](#embedding-hosted-videos-in-markdown) +- [Writing custom components for hosted video](#writing-custom-components-for-hosted-video) +- [Querying video data from Markdown with GraphQL](#querying-video-data-from-markdown-with-graphql) +- [Hosting your own HTML5 video files](#hosting-your-own-html5-video-files) +- [Using custom video players](#using-custom-video-players) + +## Sourcing video from a host + +The easiest method for including video on a Gatsby site is to source an uploaded file from a site like YouTube, Vimeo, or Twitch. Using the source URL from one of those hosts, you can use Remark plugins or create a custom `