-
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: Create a Starter #13057
Docs: Create a Starter #13057
Conversation
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.
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. |
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 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 |
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.
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.
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.
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! |
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.
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
www/src/data/sidebars/doc-links.yaml
Outdated
@@ -154,9 +154,6 @@ | |||
link: /docs/source-plugin-tutorial/ | |||
- title: Starters | |||
link: /docs/starters/ | |||
items: |
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.
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.
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 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...
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.
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: 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
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.