Skip to content

Commit

Permalink
Merge branch 'master' into alvinthen-feature/filter-linked-node
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews committed Feb 8, 2018
2 parents 4f4e73c + 279103f commit 5240bd5
Show file tree
Hide file tree
Showing 192 changed files with 5,326 additions and 2,162 deletions.
9 changes: 7 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ If you want your issue to be resolved quickly, please include in your issue:
changes you've made there.

## Contributing

We want contributing to Gatsby to be fun, enjoyable, and educational for anyone and everyone. Contributions go far beyond pull requests and commits; we are thrilled to receive a variety of other contributions including the following:

* Blogging, speaking about, or creating tutorials about one of Gatsby's many features. Mention @gatsbyjs on Twitter and/or email shannon [at] gatsbyjs [dot] com so we can give pointers and tips (if you want them :) and help you spread the word. Please add your blog posts and videos of talks to our [Awesome Gatsby](/docs/awesome-gatsby/) page.
Expand All @@ -29,17 +30,21 @@ If you are worried or don't know where to start, you can always reach out to Sha
Looking to speak about Gatsby? We'd love to review your talk abstract/CFP! You can email it to shannon [at] gatsbyjs [dot] com and we can give pointers or tips!!!

### Special Note on Issues

If an issue is affecting you, start at the top of this list and complete as many tasks on the list as you can:

1. If there is an issue, +1 the issue to indicate that it's affecting you
2. If there's an issue and you can add more detail, write a comment describing how the bug is affecting OR if you can, write up a work-around for the bug
3. If there's not an issue, write the most complete description of what's happening, preferably with link to a Gatsby site that reproduces the problem
4. Offer to help fix the bug (and it's totally expected that you ask for help; open-source maintainers want to help contributors)
5. Deliver a well-crafted, tested PR

### Creating your own plugins and loaders

If you create a loader or plugin, we would <3 for you to open source it, and put it on npm.

### Contributing to the repo

Gatsby uses a "monorepo" pattern to manage its many dependencies and relies on
lerna and yarn to configure the repository for active development.

Expand Down Expand Up @@ -73,7 +78,7 @@ The usual contributing steps are:

### Contributing to the documentation.

Gatsby, unsurprisingly, uses Gatsby for it's documentation website.
Gatsby, unsurprisingly, uses Gatsby for its documentation website.

If you want to add/modify any Gatsby documentation, go to the
[docs folder on Github](https://github.com/gatsbyjs/gatsby/tree/master/docs) and
Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![gatsby channel on discord](https://img.shields.io/badge/discord-gatsby%40reactiflux-738bd7.svg?style=flat-square)](https://discord.gg/0ZcbPKXt5bVoxkfV)
[![Twitter Follow](https://img.shields.io/twitter/follow/gatsbyjs.svg?style=social)](https://twitter.com/gatsbyjs)

<img alt="Gatsby" src="https://www.gatsbyjs.org/gatsby-negative.svg" width="100">
<img alt="Gatsby" src="https://www.gatsbyjs.org/monogram.svg" width="100">

# Gatsby

Expand All @@ -20,6 +20,7 @@ Websites built with Gatsby:
* [Sourcegraph](https://about.sourcegraph.com)
* [Simply](https://simply.co.za)
* [The freeCodeCamp Guide](https://guide.freecodecamp.org)
([source](https://github.com/freeCodeCamp/guides))
* [FloydHub's Blog](https://blog.floydhub.com)
* [mParticle's Documentation](https://docs.mparticle.com)
* [Segment's Blog](https://segment.com/blog/)
Expand All @@ -31,6 +32,8 @@ Websites built with Gatsby:
([source](https://github.com/reasonml/reasonml.github.io))
* [Bricolage.io](https://www.bricolage.io/)
([source](https://github.com/KyleAMathews/blog))
* [Hack Club](https://hackclub.com/)
([source](https://github.com/hackclub/site))
* [Jamie Henson's Blog](http://jamiehenson.com/)
([source](https://github.com/jamiehenson/jh47-gatsby))
* [Sean Coker's Blog](https://sean.is/)
Expand Down Expand Up @@ -144,6 +147,14 @@ Websites built with Gatsby:
* [several levels](https://severallevels.io/) ([source](https://github.com/Harrison1/several-levels))
* [Flooring Factories Outlets](https://www.flooringfactoriesoutlets.com/)
* [Nortcast](https://nortcast.com/)
* [VisitGemer](https://visitgemer.sk/)
* [Nexit](https://nexit.sk/)
* [ERC dEX](https://ercdex.com)
* [iContract Blog](https://blog.icontract.co.uk)
* [Dona Rita](https://donarita.co.uk) ([source](https://github.com/peduarte/dona-rita-website))
* [Andy Slezak](https://www.aslezak.com) ([source](https://github.com/amslezak))
* [Odayaka](http://odayaka.net) ([source](https://github.com/odayakanaasa/odayaka))
* [Ventura Digitalagentur Köln](https://www.ventura-digital.de)

## Docs

Expand Down
40 changes: 19 additions & 21 deletions docs/blog/2017-12-07-taking-gatsby-for-a-spin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,25 @@ Data from anywhere with static output. That's sort of the holy grail isn't it? R

```es6
export const query = graphql`
query BlogPostQuery($slug: String!) {
markdownRemark(fields: { slug: { eq: $slug } }) {
html
fields {
slug
}
frontmatter {
title
date(formatString: "DD MMMM, YYYY")
cover {
childImageSharp {
resolutions(
width: 1200,
) {
src
}
}
}
}
}
}
query BlogPostQuery($slug: String!) {
markdownRemark(fields: { slug: { eq: $slug } }) {
html
fields {
slug
}
frontmatter {
title
date(formatString: "DD MMMM, YYYY")
cover {
childImageSharp {
resolutions(width: 1200) {
src
}
}
}
}
}
}
`;
```

Expand Down
20 changes: 11 additions & 9 deletions docs/blog/2018-01-22-getting-started-gatsby-and-wordpress/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on January 18, 2018._

Earlier this week I began rebuilding my blog using GatsbyJS + WordPress. As I familiarized with Gatsby, I found myself flipping through a million tabs, and I thought it might be useful to summarize concepts and to aggregate links I found helpful.

I recently decided to tackle a redo of my blog. I wanted to do something different and I've been hearing a lot about GatsbyJS. A static site generator for React that I can easily pull my existing WordPress data for? Sold. I'll try it.
I recently decided to tackle a redo of my blog. I wanted to do something different and I've been hearing a lot about GatsbyJS. A static site generator for React that I can easily pull my existing WordPress data for? Sold. I'll try it.

I generated a new site using the [default starter](https://github.com/gatsbyjs/gatsby-starter-default) and read through what it gave me. Assuming you have the [Gatsby CLI](/docs/) installed, run:

Expand All @@ -25,15 +25,16 @@ Essentially the Gatsby home base. The two things defined here initially (in the
```javascript
module.exports = {
siteMetadata: {
title: 'Gatsby Default Starter',
title: "Gatsby Default Starter",
},
plugins: ['gatsby-plugin-react-helmet'],
plugins: ["gatsby-plugin-react-helmet"],
};
```

See the [docs page on gatsby-config.js](/docs/gatsby-config/) for more.

For the curious:

* `gatsby-plugin-react-helmet` is a plugin the starter includes. It's a [document head manager for React](/packages/gatsby-plugin-react-helmet/).

##gatsby-node.js
Expand Down Expand Up @@ -93,21 +94,21 @@ I used the `gatsby-node.js` file from the plugin demo to get started. For my pur
For example, below is the part of the demo `gatsby-node.js` file that iterates over all the WordPress post data.

```javascript
const postTemplate = path.resolve(`./src/templates/post.js`)
const postTemplate = path.resolve(`./src/templates/post.js`);

_.each(result.data.allWordpressPost.edges, edge => {
createPage({
// will be the url for the page
path: edge.node.slug,
// specify the component template of your choice
component: slash(postTemplate),
// In the ^template's GraphQL query, 'id' will be available
// In the ^template's GraphQL query, 'id' will be available
// as a GraphQL variable to query for this posts's data.
context: {
id: edge.node.id,
}
})
})
id: edge.node.id,
},
});
});
```

The [docs define a Gatsby page](/docs/api-specification/#concepts) as "a site page with a pathname, a template component, and optional graphql query and layout component." See the docs on the [createPage bound action creator](/docs/bound-action-creators/#createPage) and [guide on creating and modifying pages for more detail](/docs/creating-and-modifying-pages/).
Expand All @@ -133,6 +134,7 @@ If you include the "optional GraphQL query" noted above, the result of that quer
While this isn't a tutorial -- more a guided walkthrough of me familiarizing and stepping through an initial Gatsby setup -- if you're following along with the [demo code](https://github.com/gatsbyjs/gatsby/tree/master/examples/using-wordpress) you're probably close to (or already!) seeing your WordPress data populate your Gatsby dev site if you run `gatsby develop`!

##Sidenotes

1. You [don't need to know GraphQL](https://github.com/gatsbyjs/gatsby/issues/1172#issuecomment-308634739) to get started with Gatsby. I didn't. It's been a good introduction.
2. Gatsby makes heavy use of [plugins](/docs/plugins/) — both official and community — for a lot of things, from one that implements [Google Analytics](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-google-analytics), to one that adds [GitHub's accessibility error scanner](https://github.com/alampros/gatsby-plugin-accessibilityjs) to all pages.
3. Read through some of the source code. I particularly enjoyed reading through [the bootstrap process](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/bootstrap/index.js). (It's beautifully commented).
Expand Down
Loading

0 comments on commit 5240bd5

Please sign in to comment.