Skip to content
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: Create a Starter #13057

Merged
merged 7 commits into from
Apr 5, 2019
Merged

Docs: Create a Starter #13057

merged 7 commits into from
Apr 5, 2019

Conversation

marcysutton
Copy link
Contributor

Description

Starters are one of the most-searched Gatsby features. When I looked through the docs, I found a stub for Creating a Starter that looked like a good one to fill in! I moved it to the Contributing section and added a link from the main Starters doc.

Definitely open to feedback on this one, if there's anything I missed or got incorrect in this first pass (specifically around required files and recommended qualities).

I added a link to the Introducing Themes blog post as further reading, since it mentions the limitations in starters...but I could see that being a whole doc by itself in the future ("when do I create a starter versus a theme")? That can come later when Themes are more mainstream.

@marcysutton marcysutton requested a review from a team April 2, 2019 23:28
@marcysutton marcysutton requested a review from a team as a code owner April 2, 2019 23:28
Copy link
Contributor

@LekoArts LekoArts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looking good, some minor complaints from my side 👍

- `gatsby-config.js`: a space to add configurable data and plugins. See [Gatsby Config](/docs/gatsby-config/) for more information.
- `src/pages`: a directory for page components to live, with at least [one example](https://github.com/gatsbyjs/gatsby-starter-hello-world/blob/master/src/pages/index.js).
- `static`: a directory for static assets, such as a `favicon.ico` file.
- `.gitignore` _(optional)_: a file telling Git which resources to leave out of source control, such as the `node_modules` directory, log files, Gatsby `.cache` and `public` directories.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't make this optional as it's really bad practice to check-in the node_modules and/or public folder.

Starters should utilize metadata in `gatsby-config.js` wherever possible, as this is typically the first place users will look for site configuration information. Some examples of things you could make configurable in `gatsby-config` include:

- Site title
- Basic color palette
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You normally don't put such information into the gatsby-config but rather into it's own file. You could change that aspect to a new paragraph:

When using things like styled-components it's highly appreciated if the built-in theming capabilities are used and a "theme" file is exposed for configuration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, thanks @LekoArts!

- Basic color palette
- Author name, contact information, and bio

Alternatively, for starters connecting to a headless CMS, author-specific items could be pulled in tp the starter from a CMS platform using a source plugin and GraphQL instead. Showing users how this is done can make your starter very helpful!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Alternatively, for starters connecting to a headless CMS, author-specific items could be pulled in tp the starter from a CMS platform using a source plugin and GraphQL instead. Showing users how this is done can make your starter very helpful!
Alternatively, for starters connecting to a headless CMS, author-specific items could be pulled in to the starter from a CMS platform using a source plugin and GraphQL instead. Showing users how this is done can make your starter very helpful!

typo

@LekoArts LekoArts added the type: documentation An issue or pull request for improving or updating Gatsby's documentation label Apr 3, 2019
@@ -154,9 +154,6 @@
link: /docs/source-plugin-tutorial/
- title: Starters
link: /docs/starters/
items:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wanted to surface that there are use cases for starters that don't involve sharing them (eg, agencies building on Gatsby often have an internal starter they use for all projects) -- so we may want to keep this link in.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered leaving it there, but it's a pretty messy IA to link into the Contributing section from the middle of the docs sidebar. I'd recommend adding more language to the Starters doc instead. Especially since this has been a stub until now...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok so after looking at the Plugins section of the docs, I decided to keep this in /docs instead of /contributing. I also reworded the title to match the style of other docs ("Creating a Starter" instead of "Create a Starter"). Thanks for the suggestion!

docs/contributing/create-a-starter.md Outdated Show resolved Hide resolved
docs/contributing/create-a-starter.md Outdated Show resolved Hide resolved
docs/contributing/create-a-starter.md Outdated Show resolved Hide resolved
docs/contributing/create-a-starter.md Outdated Show resolved Hide resolved
@marcysutton marcysutton merged commit 314ca8e into master Apr 5, 2019
@marcysutton marcysutton deleted the starter-docs branch April 5, 2019 16:28
johno pushed a commit to jlengstorf/gatsby that referenced this pull request Apr 10, 2019
* docs: add page on creating starters

* linter output, formatting, and a few more links

* incorporate feedback

* add info about theming and configuration

* move Create a Starter page back to docs

* soften language around adding to Starter Library
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation An issue or pull request for improving or updating Gatsby's documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants