Blog & Website Contributions
We wholeheartedly welcome contributions to the Gatsby blog and website!
Here are some things to keep in mind when deciding where to contribute to Gatsby:
- Blog posts work best for case studies and time-sensitive storytelling (see the blog post format).
- Docs are continually relevant and discoverable learning materials that go beyond any one case study or situation.
- Website changes that improve either of these are always welcome!
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 or contacting @gatsbyjs on Twitter.
To add a new blog post to the gatsbyjs.org blog:
- Clone the Gatsby repo and navigate to
/www
- Run
yarn
to install all of the website’s dependencies. (Why Yarn?) - Run
npm run develop
to preview the blog athttp://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 anindex.md
file. - Add
title
,date
,author
, andtags
(view existing tags or add a new one) to the frontmatter of yourindex.md
. If you are cross posting your post you can addcanonicalLink
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 ofhttps://gatsbyjs.org/contributing/how-to-contribute
- Follow the Style Guide to make sure you’re using the appropriate wording.
- Double check your grammar and capitalize 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
ordocs-your-change
(PR example)
- We recommend using a prefix of
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 (---
).
---
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 and navigate to
/www
- Run
yarn
to install all of the website’s dependencies. - Run
npm run develop
to preview the site athttp://localhost:8000/
.
Note: If you are experiencing issues on a Linux machine, run
sudo apt install libvips-dev
, to install a native dependency. You can also reference Gatsby guide on Linux for other Linux-specific requirements.
Now you can make and preview your changes before raising a pull request!
For full repo setup instructions, visit the code contributions page.
Edit this page on GitHub