-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: new section for contributing #11812
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
f3c6bfd
initial move of contributing pages
c027f16
fix: fix sidebar and move some images around
DSchau 7c3af1d
chore: fix broken link
DSchau e9d37d6
Second pass on contributing docs!
23f6fa2
move contributing to the end of docs-links
7da2db2
chore: disable accordion (expand top-level headers)
DSchau bcfc233
latest updates to contributing docs
3954d82
deprioritize creator showcase
6c6481f
convert github triage doc to stub
6b66ff8
incorporate feedback from Sam
8693736
Update docs/contributing/code-contributions.md
DSchau 80515bf
fix links, codeowners
a4f96b8
reorganize code/docs/blog/website contributions
da174b6
add docker-compose instructions
171dcf9
add details on contributing, incl. pairing
f638534
add tables of contents to docs
488facc
fix a typo
7b23b07
tweak blog/code page order, style
bb4228d
add more list items for readability
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
 | ||
``` | ||
|
||
## 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe link to the "good first issue" label for issues? (Not sold on linking to it exactly here, but it's probably worth linking to)
Suggested change
|
||||||||
|
||||||||
...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! |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This document covers contributing content so I find the title misleading, but I don't really have better alternative
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see that. The experience is pretty intertwined, I didn't see a clear way to separate them without repeating stuff....but happy to take suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah here's why it's confusing: blog content and the website are all grouped into "code contributions". I will make a separate page for "blog and website contributions".
Edited to add my plans for making new pages!