Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
gillkyle committed Apr 6, 2020
2 parents e448de3 + 9fb521a commit bf82f98
Show file tree
Hide file tree
Showing 15 changed files with 313 additions and 239 deletions.
10 changes: 1 addition & 9 deletions docs/contributing/organize-a-gatsby-event.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,4 @@
title: Organize a Gatsby Event
---

Our communiy event support offerings and process are undergoing some changes. Check back soon to see our updated community event support opportunities!

## What constitutes a Gatsby event?

A community-organized Gatsby event can be a local meetup, a small conference, a “lunch and learn” with coworkers, or a larger event - as long as **it includes at least one Gatsby-focused presentation or discussion**. It’s up to you how many people you want to invite and how casual the environment. You can organize an event at your workplace or for the local community.

## Related Links

- [Gatsby's Community Events](/contributing/events/)
**IMPORATANT NOTE ON COMMUNITY EVENTS: Promotion and support of Gatsby community events is currently suspended due to COVID-19. Stay tuned for updates on when our community events program will resume.**
12 changes: 6 additions & 6 deletions docs/docs/creating-a-generic-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ In `gatsby-node.js` you can carry out functions with these APIs, such as:
[sourceNodes](/docs/node-apis/#sourceNodes) is a life-cycle API that a plugin can use to create Nodes. An example of how to implement a function using `sourceNodes` is shown below:

```javascript:title=gatsby-node.js
exports.sourceNodes = ({ actions, createNodeId, createContentDigest })=>{
exports.sourceNodes = ({ actions, createNodeId, createContentDigest }) => {
const nodeData = {
title : "Test Node",
description:"Testing the node "
title: "Test Node",
description: "Testing the node ",
}
const newNode = {
...nodeData,
id: createNodeId("TestNode-testid")
internal :{
type: "TestNode"
id: createNodeId("TestNode-testid"),
internal: {
type: "TestNode",
contentDigest: createContentDigest(nodeData),
},
}
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/sourcing-from-graphcms.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ You can install this component with:

### Configure the plugin

The last step required before you can query your data is to configure the `gatsby-source-graphql` plugin. Open `gatsby-config.js` and add the following object to the plugins array. This example uses an open API from GraphCMS but you will most likely want to replace this with your own API and provide a fieldName that makes the most sense to your project. [Here's more information on working with GraphCMS APIs.](https://docs.graphcms.com/developers/api)
The last step required before you can query your data is to configure the `gatsby-source-graphql` plugin. Open `gatsby-config.js` and add the following object to the plugins array. This example uses an open API from GraphCMS but you will most likely want to replace this with your own API and provide a fieldName that makes the most sense to your project. [Here's more information on working with GraphCMS APIs.](https://docs.graphcms.com/docs/api)

```js
{
Expand Down
14 changes: 7 additions & 7 deletions docs/docs/telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ We use these metrics to better understand the usage patterns. These metrics will

Specifically, we collect the following information for _all_ telemetry events:

- Timestamp of the occurrence
- Command invoked (e.g. `build` or `develop`)
- Gatsby machine ID. This is generated with UUID and stored in global gatsby config at ~/.config/gatsby/config.json.
- Unique session ID. This is generated on each run with UUID.
- One-way hash of the current working directory or a hash of the git remote
- General OS level information (operating system, version, CPU architecture, and whether the command is run inside a CI)
- Current Gatsby version
- Timestamp of the occurrence.
- Command invoked (e.g. `build` or `develop`).
- Gatsby machine ID: This is generated with UUID and stored in global gatsby config at ` ~/.config/gatsby/config.json`.
- Unique session ID: This is generated on each run with UUID.
- One-way hash of the current working directory or a hash of the git remote.
- General OS level information (operating system, version, CPU architecture, and whether the command is run inside a CI).
- Current Gatsby version.

The access to the raw data is highly controlled, and we cannot identify individual users from the dataset. It is anonymized and untraceable back to the user.

Expand Down
62 changes: 32 additions & 30 deletions docs/docs/using-gatsby-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,30 +83,31 @@ module.exports = {

```jsx:title=src/pages/my-dogs.js
import React from "react"
import { useStaticQuery, graphql } from "gatsby" // highlight-line
import { graphql } from "gatsby" // highlight-line
import Layout from "../components/layout"

export default () => {
// highlight-start
const data = useStaticQuery(graphql`
query MyQuery {
file(relativePath: { eq: "images/corgi.jpg" }) {
childImageSharp {
# Specify the image processing specifications right in the query.
fluid {
...GatsbyImageSharpFluid
}
}
}
}
`)
// highlight-end
export default ({ data }) => {
return (
<Layout>
<h1>I love my corgi!</h1>
</Layout>
)
}

// highlight-start
export const query = graphql`
query MyQuery {
file(relativePath: { eq: "images/corgi.jpg" }) {
childImageSharp {
# Specify the image processing specifications right in the query.
fluid {
...GatsbyImageSharpFluid
}
}
}
}
`
// highlight-end
```

<EggheadEmbed
Expand All @@ -118,23 +119,11 @@ export default () => {

```jsx:title=src/pages/my-dogs.js
import React from "react"
import { useStaticQuery, graphql } from "gatsby"
import { graphql } from "gatsby"
import Layout from "../components/layout"
import Img from "gatsby-image" // highlight-line

export default () => {
const data = useStaticQuery(graphql`
query MyQuery {
file(relativePath: { eq: "images/corgi.jpg" }) {
childImageSharp {
# Specify the image processing specifications right in the query.
fluid {
...GatsbyImageSharpFluid
}
}
}
}
`)
export default ({ data }) => {
return (
<Layout>
<h1>I love my corgi!</h1>
Expand All @@ -147,6 +136,19 @@ export default () => {
</Layout>
)
}

export const query = graphql`
query MyQuery {
file(relativePath: { eq: "images/corgi.jpg" }) {
childImageSharp {
# Specify the image processing specifications right in the query.
fluid {
...GatsbyImageSharpFluid
}
}
}
}
`
```

<EggheadEmbed
Expand Down
80 changes: 80 additions & 0 deletions docs/sites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9978,6 +9978,32 @@
built_by: Built by Rebels Ltd.
built_by_url: https://builtbyrebels.com/
featured: false
- title: OCIUS
url: https://www.ocius.com.au/
main_url: https://www.ocius.com.au/
source_url: https://github.com/ocius/website
description: >
Ocius Technology Ltd (formerly Solar Sailor Holdings Ltd) is an Australian public unlisted company with Research and Development facilities at the University of NSW.
categories:
- Business
- Technology
- Science
built_by: Sergey Monin
built_by_url: https://build-in-saratov.com/
- title: Kosmos & Kaos
main_url: https://www.kosmosogkaos.is/
url: https://www.kosmosogkaos.is/
description: >
A carefully designed user experience is good business.
categories:
- Design
- Consulting
- Agency
- Web Development
- JavaScript
built_by: Kosmos & Kaos
built_by_url: https://www.kosmosogkaos.is/
featured: false
- title: Design Portfolio of Richard Bruskowski
main_url: https://bruskowski.design/
url: https://bruskowski.design/
Expand Down Expand Up @@ -10247,3 +10273,57 @@
- Portfolio
- Freelance
built_by: Wojciech Kaluzny
- title: The COVID Tracking Project
url: https://covidtracking.com/
main_url: https://covidtracking.com/
source_url: https://github.com/COVID19Tracking/website
description: >
The COVID Tracking Project collects and publishes the most complete testing data available for US states and territories.
categories:
- Media
- Healthcare
built_by: The COVID Tracking Project Web Team
built_by_url: https://github.com/COVID19Tracking/website/graphs/contributors
- title: The Gauntlet Coverage of COVID-19 in Canada
url: https://covid19.thegauntlet.ca
main_url: https://covid19.thegauntlet.ca
description: >
Tracking The Spread of Coronavirus in Canada
categories:
- Media
- Education
built_by: Masoud Karimi
built_by_url: https://github.com/masoudkarimif
- title: Zestard Technologies
main_url: https://www.zestard.com
url: https://www.zestard.com
description: >
Zestard Technologies is an eCommerce Specialist company focusing on Magento & Shopify as a core expertise.
categories:
- Web Development
- WordPress
- Technology
- Agency
- E-Commerce
built_by: Zestard Technologies
built_by_url: https://www.zestard.com
- title: Kostas Vrouvas
main_url: https://kosvrouvas.com
url: https://kosvrouvas.com
featured: false
categories:
- Blog
- Portfolio
built_by: Kostas Vrouvas
- title: Hanare Cafe in Toshijima, Toba, Japan
main_url: https://hanarecafe.com
url: https://hanarecafe.com
source_url: https://github.com/mnishiguchi/hanarecafe-gatsby
description: >
A website for a cafe/bakery located in Toshijima, a beautiful sightseeing spot just a 20-minutes ferry ride from downtown Toba, Japan.
categories:
- Food
- Travel
built_by: Masatoshi Nishiguchi
built_by_url: https://mnishiguchi.com
featured: false
66 changes: 57 additions & 9 deletions docs/starters.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
- url: https://22boxes-gatsby-uno.netlify.com/
repo: https://github.com/iamtherealgd/gatsby-starter-22boxes-uno
description: A Gatsby starter for creating blogs and showcasing your work
tags:
- Blog
- Portfolio
- Similar to gatsby-starter-blog
- Markdown
- SEO
- Showcase
- Landing pages for work
features:
- Work and About pages
- Work page with blog type content management
- Personal webiste to create content and put your portfolio items
- Landing pages for your work items, not just links
- url: https://gatsby-wordpress-libre.netlify.com/
repo: https://github.com/armada-inc/gatsby-wordpress-libre-starter
description: A Gatsby starter for creating blogs from headless WordPress CMS.
Expand Down Expand Up @@ -1869,19 +1885,24 @@
- Full Render Control with Portable Text
- gatsby-image support
- Content types for company info, pages, projects, people, and blog posts
- url: https://gatsby-starter-under-construction.netlify.com/
repo: https://github.com/robinmetral/gatsby-starter-under-construction
description: Blazing fast "Under Construction" page with a blazing quick setup.
- url: https://gatsby-starter-oss.netlify.com/
repo: https://github.com/robinmetral/gatsby-starter-oss
description: A Gatsby starter to showcase your open-source projects.
tags:
- Onepage
- Portfolio
- Styling:Theme-UI
- Styling:CSS-in-JS
- SEO
- Onepage
- PWA
- SEO
- Testing
- Linting
features:
- Configure everything in gatsby-config.js
- Creative CSS3 background patterns by Lea Verou
- Built-in Google Fonts support
- Social icons with react-social-icons
- 🐙🐈 Pull your pinned repos from GitHub
- 👩‍🎤 Style with Emotion
- ✨ Themeable with Theme UI
- 🚀 Powered by gatsby-theme-oss
- 💯 100/100 Lighthouse scores
- url: https://gatsby-starter-docz.netlify.com/
repo: https://github.com/RobinCsl/gatsby-starter-docz
description: Simple starter where building your own documentation with Docz is possible
Expand Down Expand Up @@ -5834,3 +5855,30 @@
- CSS-in-Reason support
- StaticQuery GraphQL support in ReasonML
- Similar to gatsby-starter-blog
- url: https://mik3y.github.io/gatsby-starter-basic-bootstrap/
repo: https://github.com/mik3y/gatsby-starter-basic-bootstrap
description: A barebones starter featuring react-bootstrap and deliberately little else
tags:
- Styling:Bootstrap
- Styling:SCSS
features:
- Uses react-bootstrap, sass, and little else
- Skeleton starter, based on gatsby-starter-default
- Optional easy integration of themes from Bootswatch.com
- url: https://gatsby-starter-songc.netlify.com/
repo: https://github.com/FFM-TEAM/gatsby-starter-song
description: A Gatsby starter for blog style with fresh UI.
tags:
- Blog
- Netlify
- SEO
- Language:TypeScript
- Styling:CSS-in-JS
features:
- Emoji (emojione)
- Code syntax highlighting (atom-one-light Style)
- Mobile friendly and fully responsive
- Comment feature ( utterances)
- Post side PostTOC
- Simple fresh design like Medium
- Readability
6 changes: 6 additions & 0 deletions packages/gatsby-source-graphql/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.3.2](https://github.com/gatsbyjs/gatsby/compare/gatsby-source-graphql@2.3.1...gatsby-source-graphql@2.3.2) (2020-04-06)

### Bug Fixes

- **gatsby-source-graphql:** Convert ts to plain js until better times ([#22848](https://github.com/gatsbyjs/gatsby/issues/22848)) ([ad945ec](https://github.com/gatsbyjs/gatsby/commit/ad945ec))

## [2.3.1](https://github.com/gatsbyjs/gatsby/compare/gatsby-source-graphql@2.3.0...gatsby-source-graphql@2.3.1) (2020-04-03)

**Note:** Version bump only for package gatsby-source-graphql
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-source-graphql/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gatsby-source-graphql",
"description": "Gatsby plugin which adds a third-party GraphQL API to Gatsby GraphQL",
"version": "2.3.1",
"version": "2.3.2",
"author": "Mikhail Novikov <freiksenet@gmail.com>",
"bugs": {
"url": "https://github.com/gatsbyjs/gatsby/issues"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { parse } from "graphql"
import { execute } from "apollo-link"
import { createDataloaderLink } from "../dataloader-link"
const { parse } = require(`graphql`)
const { execute } = require(`apollo-link`)
const { createDataloaderLink } = require(`../dataloader-link`)

const sampleQuery = parse(`{ foo }`)
const expectedSampleQueryResult = { data: { foo: `bar` } }

// eslint-disable-next-line @typescript-eslint/camelcase
const fetchResult = { data: { gatsby0_foo: `bar` } }

const makeFetch = (expectedResult: any = fetchResult): jest.Mock<any> =>
const makeFetch = (expectedResult = fetchResult) =>
jest.fn(() =>
Promise.resolve({
json: () => Promise.resolve(expectedResult),
Expand All @@ -23,7 +22,7 @@ describe(`createDataloaderLink`, () => {
})
const observable = execute(link, { query: sampleQuery })
observable.subscribe({
next: (result: any) => {
next: result => {
expect(result).toEqual(expectedSampleQueryResult)
done()
},
Expand Down

0 comments on commit bf82f98

Please sign in to comment.