Skip to content

Commit

Permalink
docs: new section for contributing (#11812)
Browse files Browse the repository at this point in the history
## Description

As per [rfc/29](gatsbyjs/rfcs#29), this PR introduces a major change to the Gatsby docs: a new `/contributing` section. I did a big find and replace to update all links, and there are also redirects for pages that moved.

This is a pretty large PR, and I welcome any and all feedback on the new structure and content. My only request is that we try to resolve any feedback quickly so that community PRs aren't working on outdated stuff.

Here's a screenshot of the new Contributing landing page:

![contributing landing page](https://user-images.githubusercontent.com/1045233/52890806-938f8a00-313b-11e9-8645-c4991fc95fa3.png)

## Related Issues

Fixes #11803, Fixes #8847 

## Outstanding questions
- Do we need to make any additional changes to CODEOWNERS?
- I included a link to `/contributing` in the docs sidebar to ease the transition. Should the link use some kind of icon to distinguish that it takes the user away from the docs?
- Should we add a new icon to the mobile nav (I didn't make any mobile changes in this PR)?
- Any changes to the sidebar, specifically around accordions?

## Subsequent related issues/stubs

- Gatsby Governance Model: #11805
- Triaging GitHub Issues: #11810
  • Loading branch information
marcysutton authored and DSchau committed Feb 19, 2019
1 parent 62172be commit d14137c
Show file tree
Hide file tree
Showing 96 changed files with 861 additions and 350 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ about: Something isn't working as expected? Here is the right place to report.
Useful Links:
- Documentation: https://www.gatsbyjs.org/docs/
- How to File an Issue: https://www.gatsbyjs.org/docs/how-to-file-an-issue/
- How to File an Issue: https://www.gatsbyjs.org/contributing/how-to-file-an-issue/
Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
-->
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ about: Suggest a new idea for the project.
Useful Links:
- Gatsby RFCs: https://github.com/gatsbyjs/rfcs
- How to Contribute: https://www.gatsbyjs.org/docs/how-to-contribute/
- How to File an Issue: https://www.gatsbyjs.org/docs/how-to-file-an-issue/
- How to Contribute: https://www.gatsbyjs.org/contributing/how-to-contribute/
- How to File an Issue: https://www.gatsbyjs.org/contributing/how-to-file-an-issue/
Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ about: Usage question or discussion about Gatsby.
Useful Links:
- Documentation: https://www.gatsbyjs.org/docs/
- Contributing: https://www.gatsbyjs.org/contributing/
Gatsby has several community support channels, try asking your question on:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## How to Contribute

For information related to contributing to Gatsby, please check out the [How to Contribute](https://www.gatsbyjs.org/docs/how-to-contribute/) section of the documentation at the Gatsby site.
For information related to contributing to Gatsby, please check out the [How to Contribute](https://www.gatsbyjs.org/contributing/how-to-contribute/) section of the documentation at the Gatsby site.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<a href="https://npmcharts.com/compare/gatsby?minimal=true">
<img src="https://img.shields.io/npm/dt/gatsby.svg" alt="Total downloads on npm." />
</a>
<a href="https://gatsbyjs.org/docs/how-to-contribute">
<a href="https://gatsbyjs.org/contributing/how-to-contribute/">
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome!" />
</a>
<a href="https://twitter.com/intent/follow?screen_name=gatsbyjs">
Expand All @@ -49,7 +49,7 @@
<span> · </span>
<a href="https://gatsbyjs.org/showcase/">Showcase</a>
<span> · </span>
<a href="https://gatsbyjs.org/docs/how-to-contribute/">Contribute</a>
<a href="https://gatsbyjs.org/contributing/how-to-contribute/">Contribute</a>
<span> · </span>
Support: <a href="https://spectrum.chat/gatsby-js">Spectrum</a>
<span> & </span>
Expand Down Expand Up @@ -125,7 +125,7 @@ Full documentation for Gatsby lives [on the website](https://gatsbyjs.org/).

- **To dive straight into code samples head [to our documentation](https://gatsbyjs.org/docs/).** In particular, check out the “<i>Guides</i>”, “<i>API Reference</i>”, and “<i>Advanced Tutorials</i>” sections in the sidebar.

We welcome suggestions for improving our docs. See the [“how to contribute”](https://gatsbyjs.org/docs/how-to-contribute/) documentation for more details.
We welcome suggestions for improving our docs. See the [“how to contribute”](https://gatsbyjs.org/contributing/how-to-contribute/) documentation for more details.

**Start Learning Gatsby: [Follow the Tutorial](https://gatsbyjs.org/tutorial/) · [Read the Docs](https://gatsbyjs.org/docs/)**

Expand All @@ -140,11 +140,11 @@ Already have a Gatsby site? These handy guides will help you add the improvement

Whether you're helping us fix bugs, improve the docs, or spread the word, we'd love to have you as part of the Gatsby community! :muscle::purple_heart:

Check out our [**Contributing Guide**](https://gatsbyjs.org/docs/how-to-contribute/) for ideas on contributing and setup steps for getting our repositories up and running on your local machine.
Check out our [**Contributing Guide**](https://gatsbyjs.org/contributing/how-to-contribute/) for ideas on contributing and setup steps for getting our repositories up and running on your local machine.

### Code of Conduct

Gatsby is dedicated to building a welcoming, diverse, safe community. We expect everyone participating in the Gatsby community to abide by our [**Code of Conduct**](https://gatsbyjs.org/docs/code-of-conduct/). Please read it. Please follow it. In the Gatsby community, we work hard to build each other up and create amazing things together. 💪💜
Gatsby is dedicated to building a welcoming, diverse, safe community. We expect everyone participating in the Gatsby community to abide by our [**Code of Conduct**](https://gatsbyjs.org/contributing/code-of-conduct/). Please read it. Please follow it. In the Gatsby community, we work hard to build each other up and create amazing things together. 💪💜

### A note on how this repository is organized

Expand Down
2 changes: 1 addition & 1 deletion docs/blog/2018-08-01-partner-program/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ With that in mind, we’re happy to announce Gatsby’s Partner Program. Partner

Step 1: Build a client (or agency) website with Gatsby.

Step 2: Submit your Gatsby client or agency website to the [Site Showcase](/docs/site-showcase-submissions/).
Step 2: Submit your Gatsby client or agency website to the [Site Showcase](/contributing/site-showcase-submissions/).

Step 3: Fill out the form below to let us know you’re interested in learning more about future developments to Gatsby’s Partner Program.

Expand Down
4 changes: 2 additions & 2 deletions docs/blog/2018-08-09-swag-store/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Thanks for being part of the open source community! 💪💜
[twitter]: https://twitter.com/gatsbyjs
[org]: https://github.com/gatsbyjs
[store]: https://store.gatsbyjs.org/
[swag]: /docs/contributor-swag/
[swag]: /contributing/contributor-swag/
[swag-source]: https://github.com/gatsbyjs/store.gatsbyjs.org
[swag-api]: https://github.com/gatsbyjs/api.gatsbyjs.org
[v2]: /blog/2018-06-16-announcing-gatsby-v2-beta-launch/
Expand All @@ -78,4 +78,4 @@ Thanks for being part of the open source community! 💪💜
[auth0]: https://auth0.com/
[invite]: https://github.com/gatsbyjs/peril-gatsbyjs/blob/master/rules/invite-collaborator.ts
[peril]: https://github.com/danger/peril
[contribute]: /docs/how-to-contribute/
[contribute]: /contributing/how-to-contribute/
2 changes: 1 addition & 1 deletion docs/blog/2018-08-11-gatsby-pair-programming/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ Jason patiently explained the parts I didn’t understand about Gatsby and he al

Again, thanks Jason Lengstorf for the time! and thanks Gatsby for this amazing project!! 🎉

> If you want to sign up for your session, check out the [open community pair programming sessions docs and signup instructions](/docs/pair-programming/).
> If you want to sign up for your session, check out the [open community pair programming sessions docs and signup instructions](/contributing/pair-programming/).
2 changes: 1 addition & 1 deletion docs/blog/2018-09-07-gatsby-values/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ While we need to stick to our roadmap and make steady progress toward our compan

Open source doesn’t have the best reputation for being friendly and welcoming, and that makes us sad. **Everyone belongs in open source, and Gatsby is dedicated to making you feel welcome.**

We will never judge, condescend, or exclude anyone. Instead, we will go above and beyond to support the community, through [pair programming](https://gatsby.app/pairing), offering [free swag for contributors](https://gatsby.app/swag), giving control to the community by [auto-inviting all contributors to the Gatsby GitHub org](https://github.com/gatsbyjs/gatsby/pull/7699#issuecomment-416665803), an open and inclusive [code of conduct](/docs/code-of-conduct/), and other means that empower and embrace the incredible community that makes Gatsby possible.
We will never judge, condescend, or exclude anyone. Instead, we will go above and beyond to support the community, through [pair programming](https://gatsby.app/pairing), offering [free swag for contributors](https://gatsby.app/swag), giving control to the community by [auto-inviting all contributors to the Gatsby GitHub org](https://github.com/gatsbyjs/gatsby/pull/7699#issuecomment-416665803), an open and inclusive [code of conduct](/contributing/code-of-conduct/), and other means that empower and embrace the incredible community that makes Gatsby possible.

<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">Huge shoutout to <a href="https://twitter.com/gatsbyjs?ref_src=twsrc%5Etfw">@gatsbyjs</a>. Not only have hey been the perfect open source project for Lambda School students to contribute to, but the whole community goes above and beyond in helping students understand the OSS ecosystem generally</p>&mdash; Austen Allred (@AustenAllred) <a href="https://twitter.com/AustenAllred/status/1038084753008652289?ref_src=twsrc%5Etfw">September 7, 2018</a></blockquote>

Expand Down
2 changes: 1 addition & 1 deletion docs/blog/2018-09-17-gatsby-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ The Gatsby community has been growing very rapidly. We're seeing ~90 new PRs per
We're investing heavily in scaling the velocity of the OSS project including:

- Hiring more maintainers
- Helping grow more maintainers through [pair programming](/docs/pair-programming/) & maintainer chat rooms & email list
- Helping grow more maintainers through [pair programming](/contributing/pair-programming/) & maintainer chat rooms & email list
- Writing more automated tests to reduce manual PR testing
- Automating common checks and workflows
- Rewarding contributors with free swag
Expand Down
2 changes: 1 addition & 1 deletion docs/blog/2018-10-09-hacktoberfest-kickoff/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Our Hacktoberfest goals are:
1. To provide a range of issues with a clearly defined scope, with minimal background knowledge needed outside of the issue description.
2. To make contributing to Gatsby as welcoming, friendly, and accessible as we can -- especially to first-time contributors.

Plus, if you’ve never contributed to Gatsby before, after your very first PR is merged, you can redeem some [free Gatsby swag](https://www.gatsbyjs.org/docs/contributor-swag/)! (_Note: Not Hacktoberfest related. We do this always!_)
Plus, if you’ve never contributed to Gatsby before, after your very first PR is merged, you can redeem some [free Gatsby swag](https://www.gatsbyjs.org/contributing/contributor-swag/)! (_Note: Not Hacktoberfest related. We do this always!_)

<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">Thanks <a href="https://twitter.com/gatsbyjs?ref_src=twsrc%5Etfw">@gatsbyjs</a> for the t-shirt! If there are any developers out there that haven’t tried out Gatsby yet here is my dog Birch silently judging you. 😉 Trust me, it’s awesome. <a href="https://t.co/THDSmhKdBb">pic.twitter.com/THDSmhKdBb</a></p>&mdash; Ryan Wiemer (@ryanwiemer) <a href="https://twitter.com/ryanwiemer/status/1022267081998266368?ref_src=twsrc%5Etfw">July 25, 2018</a></blockquote>

Expand Down
65 changes: 65 additions & 0 deletions docs/contributing/blog-and-website-contributions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
title: Blog & Website Contributions
---

We wholeheartedly welcome contributions to the Gatsby blog and website! Instructions on this page:

- [Contributing to the blog](#contributing-to-the-blog)
- [Blog post format](#blog-post-format)
- [Making changes to the website](#making-changes-to-the-website)

## Contributing to the blog

Note: Before adding a blog post ensure you have approval from a member of the Gatsby team. You can do this by [opening an issue](https://github.com/gatsbyjs/gatsby/issues/new/choose) or contacting [@gatsbyjs on Twitter](https://twitter.com/gatsbyjs).

To add a new blog post to the gatsbyjs.org blog:

- Clone [the Gatsby repo](https://github.com/gatsbyjs/gatsby/) and navigate to `/www`
- Run `yarn` to install all of the website's dependencies. ([Why Yarn?](/contributing/setting-up-your-local-dev-environment#using-yarn))
- Run `npm run develop` to preview the blog at `http://localhost:8000/blog`.
- The content for the blog lives in the `/docs/blog` folder. Make additions or modifications here.
- Add your avatar image to `/docs/blog/avatars`
- Add your name to `/docs/blog/author.yaml`
- Add a new folder following the pattern `/docs/blog/yyyy-mm-dd-title`. Within this newly created folder add an `index.md` file.
- Add `title`, `date`, `author`, and `tags` ([view existing tags](https://www.gatsbyjs.org/blog/tags/) or add a new one) to the frontmatter of your `index.md`. If you are cross posting your post you can add `canonicalLink` for SEO benefits. You can check the other blog posts in `/docs/blog` for examples.
- If your blog post contains images add them to your blog post folder and reference them in your post's `index.md`.
- Ensure any links to gatsbyjs.org are relative links - `/contributing/how-to-contribute/` instead of `https://gatsbyjs.org/contributing/how-to-contribute`
- Follow the [Style Guide](https://www.gatsbyjs.org/contributing/gatsby-style-guide/#word-choice) to make sure you're using the appropriate wording.
- Double check your grammar and capitalise correctly
- Commit and push to your fork
- Create a pull request from your branch
- We recommend using a prefix of `docs`, e.g. `docs/your-change` or `docs-your-change` ([PR example](https://github.com/gatsbyjs/gatsby/commit/9c21394add7906974dcfd22ad5dc1351a99d7ceb#diff-bf544fce773d8a5381f64c37d48d9f12))

### Blog post format

The following format can help you in creating your new blog content. At the top is "frontmatter", a fancy name for metadata in Markdown; the frontmatter for your post should include a title, date, singular author name (for now, we would welcome issues/PRs for this), and one or more tags. Your content will follow, after the second set of dashes (`---`).

```md
---
title: "Your Great Blog Post"
date: YYYY-MM-DD
author: John Doe
tags:
- awesome
- post
---

Your next great blog post awaits!

Include images by creating a folder for your post and including
Markdown and image files for easy linking.

![awesome example](./image.jpg)
```

## Making changes to the website

If you want to make changes, improvements, or add new functionality to the website: like with the blog, you don't have to set up the full Gatsby repo to contribute. You can spin up your own instance of the Gatsby website with these steps:

- Clone [the Gatsby repo](https://github.com/gatsbyjs/gatsby/) and navigate to `/www`
- Run `yarn` to install all of the website's dependencies.
- Run `npm run develop` to preview the blog at `http://localhost:8000/blog`.

Now you can make and preview your changes before raising a pull request!

For full repo setup instructions, visit the [code contributions](/contributing/code-contributions/) page.
111 changes: 111 additions & 0 deletions docs/contributing/code-contributions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
title: Code Contributions
---

The beauty of contributing to open source is that you can clone your favorite project, get it running locally, and test out experiments and changes in real time! Way to feel like a wizard.

On this page:

- [Repo setup](#repo-setup)
- [Creating your own plugins and loaders](#creating-your-own-plugins-and-loaders)
- [Making changes to the starter Library](#making-changes-to-the-starter-library)
- [Using Docker to set up test environments](#using-docker-to-set-up-test-environments)
- [Development tools](#development-tools)

## Repo setup

This page includes details specific to the Gatsby core and ecosystem codebase.

To start setting up the Gatsby repo on your machine using git, Yarn and Gatsby-CLI, check out the page on [setting up your local dev environment](/contributing/setting-up-your-local-dev-environment/).

To contribute to the blog or Gatsbyjs.org website, check out the setup steps on the [blog and website contributions](/contributing/blog-and-website-contributions/) page. For instructions on contributing to the docs, visit the [docs contributions page](/contributing/docs-contributions/).

## Creating your own plugins and loaders

If you create a loader or plugin, we would love for you to open source it and put it on npm. For more information on creating custom plugins, please see the documentation for [plugins](/docs/plugins/) and the [API specification](/docs/api-specification/).

## Making changes to the starter library

Note: You don't need to follow these steps to submit to the starter library. This is only necessary if you'd like to contribute to the functionality of the starter library. To submit a starter, [follow these steps instead](/contributing/submit-to-starter-library/).

To develop on the starter library, you'll need to supply a GitHub personal access token.

1. Create a personal access token in your GitHub [Developer settings](https://github.com/settings/tokens).
2. In the new token's settings, grant that token the "public_repo" scope.
3. Create a file in the root of `www` called `.env.development`, and add the token to that file like so:

```text:title=.env.development
GITHUB_API_TOKEN=YOUR_TOKEN_HERE
```

The `.env.development` file is ignored by git. Your token should never be committed.

## Using Docker to set up test environments

With all of the possible Gatsby integrations, it might help to spin up a Docker container with the software application you need to test. This makes installation a breeze, so you can focus less on getting set up and more on the integration details that matter to you.

> Do you have a setup not listed here? Let us know by adding it to this file and opening a PR.
### Docker, Wordpress and Gatsby

To install Wordpress to use with Gatsby, this `docker-compose.yml` file will come in handy:

```
version: '2'
services:
db:
image: mysql:5.6
container_name: sessions_db
ports:
- "3306:3306"
volumes:
- "./.data/db:/var/lib/mysql"
restart: always
environment:
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
image: wordpress:latest
container_name: sessions_wordpress
depends_on:
- db
links:
- db
ports:
- "7000:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_PASSWORD: wordpress
volumes:
- ./wp-content:/var/www/html/wp-content
- ./wp-app:/var/www/html
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: sessions_phpmyadmin
environment:
- PMA_ARBITRARY=1
- PMA_HOST=sessions_db
- PMA_USER=wordpress
- PMA_PASSWORD=wordpress
restart: always
ports:
- 8080:80
volumes:
- /sessions
```

Use the above file contents when following the Docker Wordpress install instructions: https://docs.docker.com/compose/wordpress/

Using Docker Compose, you can start and stop a Wordpress instance and integrate it with the [Gatsby Wordpress source plugin](/docs/sourcing-from-wordpress/).

## Development tools

### Debugging the build process

Check [Debugging the build process](/docs/debugging-the-build-process/) page to learn how to debug Gatsby.
File renamed without changes.
23 changes: 23 additions & 0 deletions docs/contributing/community-contributions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Community Contributions
---

A big part of what makes Gatsby great is each and every one of you in the community. Your contributions enrich the Gatsby experience and make it better every day.

We welcome all contributions from you in the community, and would be thrilled to amplify your voice. Contributions are not limited to code, and can take all shapes and forms:

- Your wonderful Gatsby.js website!
- Gatsby starters
- Gatsby plugins
- Blog posts and case studies
- Talk and lecture videos
- Workshop materials
- Github issues and pull requests

...and anything else you can think of. Our showcase and library contribution docs are a great place to start:

- [Submit to Site Showcase](/contributing/submit-to-site-showcase/)
- [Submit to Starter Library](/contributing/submit-to-starter-library/)
- [Submit to Plugin Library](/contributing/submit-to-plugin-library/)

Peruse through the rest of our contributor docs and reach out to us on [Twitter](https://twitter.com/gatsbyjs), [Discord](https://gatsby.app/discord), or in a [GitHub issue](/contributing/how-to-file-an-issue/) if you have any questions about contributing!

0 comments on commit d14137c

Please sign in to comment.