Skip to content

Commit

Permalink
chore: Update READMEs to included "Deploy to Netlify" (#37671)
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts authored Feb 16, 2023
1 parent 0189625 commit 1ff9a11
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 55 deletions.
16 changes: 14 additions & 2 deletions markdown.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@ const fs = require(`fs-extra`)
const path = require(`path`)
const _ = require(`lodash`)

const exclusionList = [
`gatsby-starter-minimal`,
`gatsby-starter-minimal-ts`,
`gatsby-starter-plugin`,
`gatsby-starter-theme-workspace`,
]

module.exports = {
transforms: {
LIST_STARTERS() {
const base = path.join(process.cwd(), `starters`)
const starters = fs
.readdirSync(base)
.filter(dir => fs.statSync(path.join(base, dir)).isDirectory())
// theme starters have their own README so skip those
.filter(dir => !dir.includes(`theme`))
// Filter out excluded starters
.filter(dir => !exclusionList.includes(dir))
.reduce((merged, dir) => {
merged[dir] = JSON.parse(
fs.readFileSync(path.join(base, dir, `package.json`), `utf8`)
Expand All @@ -33,6 +40,11 @@ module.exports = {
},
STARTER(content, options, { originalPath }) {
const starter = path.basename(path.dirname(originalPath))

if (exclusionList.includes(starter)) {
return ``
}

const template = fs.readFileSync(
path.join(process.cwd(), `starters`, `README-template.md`),
`utf8`
Expand Down
10 changes: 5 additions & 5 deletions starters/README-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ _Have another more specific idea? You may want to check out our vibrant collecti
Open the `my-<%= name %>-starter` directory in your code editor of choice and edit `src/pages/index.js`. Save your changes and the browser will update in real time!
## 🚀 Quick start (Gatsby Cloud)
## 🚀 Quick start (Netlify)
Deploy this starter with one click on [Gatsby Cloud](https://www.gatsbyjs.com/cloud/):
Deploy this starter with one click on [Netlify](https://app.netlify.com/signup):
[<img src="https://www.gatsbyjs.com/deploynow.svg" alt="Deploy to Gatsby Cloud">](https://www.gatsbyjs.com/dashboard/deploynow?url=https://github.com/gatsbyjs/gatsby-starter-<%= name %>)
[<img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify" />](https://app.netlify.com/start/deploy?repository=https://github.com/gatsbyjs/gatsby-starter-<%= name %>)
## 🧐 What's inside?

Expand Down Expand Up @@ -91,6 +91,6 @@ Looking for more guidance? Full documentation for Gatsby lives [on the website](
## 💫 Deploy
[Build, Deploy, and Host On The Only Cloud Built For Gatsby](https://www.gatsbyjs.com/products/cloud/)
[Build, Deploy, and Host On Netlify](https://netlify.com)
Gatsby Cloud is an end-to-end cloud platform specifically built for the Gatsby framework that combines a modern developer experience with an optimized, global edge network.
The fastest way to combine your favorite tools and APIs to build the fastest sites, stores, and apps for the web. And also the best place to build, deploy, and host your Gatsby sites.
5 changes: 2 additions & 3 deletions starters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,12 @@ Gatsby is dedicated to building a welcoming, diverse, safe community. We expect

### A note on how this repository is organized

This repository is a [monorepo][monorepo] managed using [Lerna][lerna]. This means there are [multiple packages--starters!!--][starters] managed in this codebase that are independently versioned but co-exist within this repository.
This repository is a [monorepo][monorepo] managed using [Lerna][lerna]. This means there are multiple packages managed in this codebase that are independently versioned but co-exist within this repository.

We have set-up read-only clones of all of the [starters][starters] in the official gatsbyjs organization. For example, the [`default` starter](starters/default) is available as a read-only clone at [`gatsbyjs/gatsby-starter-default`][gatsby-starter-default]. Please open PRs versus **this** repository rather than the read-only clones. Upon merge any starters that have been modified will be tagged and released.
We have set-up read-only clones of all of the starters in the official gatsbyjs organization. For example, the `default` starter is available as a read-only clone at [`gatsbyjs/gatsby-starter-default`][gatsby-starter-default]. Please open PRs versus **this** repository rather than the read-only clones. Upon merge any starters that have been modified will be tagged and released.

[code-of-conduct]: https://gatsbyjs.com/contributing/code-of-conduct/
[contributing-guide]: https://gatsbyjs.com/contributing/how-to-contribute/
[monorepo]: https://trunkbaseddevelopment.com/monorepos
[lerna]: https://github.com/lerna/lerna
[starters]: /starters
[gatsby-starter-default]: https://github.com/gatsbyjs/gatsby-starter-default
10 changes: 5 additions & 5 deletions starters/blog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ _Have another more specific idea? You may want to check out our vibrant collecti
Open the `my-blog-starter` directory in your code editor of choice and edit `src/pages/index.js`. Save your changes and the browser will update in real time!
## 🚀 Quick start (Gatsby Cloud)
## 🚀 Quick start (Netlify)
Deploy this starter with one click on [Gatsby Cloud](https://www.gatsbyjs.com/cloud/):
Deploy this starter with one click on [Netlify](https://app.netlify.com/signup):
[<img src="https://www.gatsbyjs.com/deploynow.svg" alt="Deploy to Gatsby Cloud">](https://www.gatsbyjs.com/dashboard/deploynow?url=https://github.com/gatsbyjs/gatsby-starter-blog)
[<img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify" />](https://app.netlify.com/start/deploy?repository=https://github.com/gatsbyjs/gatsby-starter-blog)
## 🧐 What's inside?

Expand Down Expand Up @@ -92,8 +92,8 @@ Looking for more guidance? Full documentation for Gatsby lives [on the website](
## 💫 Deploy
[Build, Deploy, and Host On The Only Cloud Built For Gatsby](https://www.gatsbyjs.com/products/cloud/)
[Build, Deploy, and Host On Netlify](https://netlify.com)
Gatsby Cloud is an end-to-end cloud platform specifically built for the Gatsby framework that combines a modern developer experience with an optimized, global edge network.
The fastest way to combine your favorite tools and APIs to build the fastest sites, stores, and apps for the web. And also the best place to build, deploy, and host your Gatsby sites.
<!-- AUTO-GENERATED-CONTENT:END -->
10 changes: 5 additions & 5 deletions starters/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ _Have another more specific idea? You may want to check out our vibrant collecti
Open the `my-default-starter` directory in your code editor of choice and edit `src/pages/index.js`. Save your changes and the browser will update in real time!
## 🚀 Quick start (Gatsby Cloud)
## 🚀 Quick start (Netlify)
Deploy this starter with one click on [Gatsby Cloud](https://www.gatsbyjs.com/cloud/):
Deploy this starter with one click on [Netlify](https://app.netlify.com/signup):
[<img src="https://www.gatsbyjs.com/deploynow.svg" alt="Deploy to Gatsby Cloud">](https://www.gatsbyjs.com/dashboard/deploynow?url=https://github.com/gatsbyjs/gatsby-starter-default)
[<img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify" />](https://app.netlify.com/start/deploy?repository=https://github.com/gatsbyjs/gatsby-starter-default)
## 🧐 What's inside?

Expand Down Expand Up @@ -92,8 +92,8 @@ Looking for more guidance? Full documentation for Gatsby lives [on the website](
## 💫 Deploy
[Build, Deploy, and Host On The Only Cloud Built For Gatsby](https://www.gatsbyjs.com/products/cloud/)
[Build, Deploy, and Host On Netlify](https://netlify.com)
Gatsby Cloud is an end-to-end cloud platform specifically built for the Gatsby framework that combines a modern developer experience with an optimized, global edge network.
The fastest way to combine your favorite tools and APIs to build the fastest sites, stores, and apps for the web. And also the best place to build, deploy, and host your Gatsby sites.
<!-- AUTO-GENERATED-CONTENT:END -->
15 changes: 5 additions & 10 deletions starters/gatsby-starter-minimal-ts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</a>
</p>
<h1 align="center">
Gatsby minimal TypeScript starter
Gatsby Minimal TypeScript Starter
</h1>

## 🚀 Quick start
Expand All @@ -15,7 +15,7 @@

```shell
# create a new Gatsby site using the minimal TypeScript starter
npm init gatsby
npm init gatsby -- -ts
```

2. **Start developing.**
Expand All @@ -36,19 +36,14 @@
4. **Learn more**

- [Documentation](https://www.gatsbyjs.com/docs/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts)

- [Tutorials](https://www.gatsbyjs.com/tutorial/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts)

- [Guides](https://www.gatsbyjs.com/tutorial/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts)

- [API Reference](https://www.gatsbyjs.com/docs/api-reference/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts)

- [Plugin Library](https://www.gatsbyjs.com/plugins?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts)

- [Cheat Sheet](https://www.gatsbyjs.com/docs/cheat-sheet/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts)

## 🚀 Quick start (Gatsby Cloud)
## 🚀 Quick start (Netlify)

Deploy this starter with one click on [Gatsby Cloud](https://www.gatsbyjs.com/cloud/):
Deploy this starter with one click on [Netlify](https://app.netlify.com/signup):

[<img src="https://www.gatsbyjs.com/deploynow.svg" alt="Deploy to Gatsby Cloud">](https://www.gatsbyjs.com/dashboard/deploynow?url=https://github.com/gatsbyjs/gatsby-starter-minimal-ts)
[<img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify" />](https://app.netlify.com/start/deploy?repository=https://github.com/gatsbyjs/gatsby-starter-minimal-ts)
13 changes: 4 additions & 9 deletions starters/gatsby-starter-minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</a>
</p>
<h1 align="center">
Gatsby minimal starter
Gatsby Minimal Starter
</h1>

## 🚀 Quick start
Expand Down Expand Up @@ -36,19 +36,14 @@
4. **Learn more**

- [Documentation](https://www.gatsbyjs.com/docs/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)

- [Tutorials](https://www.gatsbyjs.com/tutorial/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)

- [Guides](https://www.gatsbyjs.com/tutorial/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)

- [API Reference](https://www.gatsbyjs.com/docs/api-reference/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)

- [Plugin Library](https://www.gatsbyjs.com/plugins?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)

- [Cheat Sheet](https://www.gatsbyjs.com/docs/cheat-sheet/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter)

## 🚀 Quick start (Gatsby Cloud)
## 🚀 Quick start (Netlify)

Deploy this starter with one click on [Gatsby Cloud](https://www.gatsbyjs.com/cloud/):
Deploy this starter with one click on [Netlify](https://app.netlify.com/signup):

[<img src="https://www.gatsbyjs.com/deploynow.svg" alt="Deploy to Gatsby Cloud">](https://www.gatsbyjs.com/dashboard/deploynow?url=https://github.com/gatsbyjs/gatsby-starter-minimal)
[<img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify" />](https://app.netlify.com/start/deploy?repository=https://github.com/gatsbyjs/gatsby-starter-minimal)
6 changes: 0 additions & 6 deletions starters/gatsby-starter-theme-workspace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,3 @@ You can run the example with:
```shell
yarn workspace example develop
```

## 🚀 Quick start (Gatsby Cloud)

Deploy this starter with one click on [Gatsby Cloud](https://www.gatsbyjs.com/cloud/):

[<img src="https://www.gatsbyjs.com/deploynow.svg" alt="Deploy to Gatsby Cloud">](https://www.gatsbyjs.com/dashboard/deploynow?url=https://github.com/gatsbyjs/gatsby-starter-theme-workspace)
10 changes: 5 additions & 5 deletions starters/gatsby-starter-wordpress-blog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ _Have another more specific idea? You may want to check out our vibrant collecti
Open the `my-gatsby-starter-wordpress-blog-starter` directory in your code editor of choice and edit `src/pages/index.js`. Save your changes and the browser will update in real time!
## 🚀 Quick start (Gatsby Cloud)
## 🚀 Quick start (Netlify)
Deploy this starter with one click on [Gatsby Cloud](https://www.gatsbyjs.com/cloud/):
Deploy this starter with one click on [Netlify](https://app.netlify.com/signup):
[<img src="https://www.gatsbyjs.com/deploynow.svg" alt="Deploy to Gatsby Cloud">](https://www.gatsbyjs.com/dashboard/deploynow?url=https://github.com/gatsbyjs/gatsby-starter-gatsby-starter-wordpress-blog)
[<img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify" />](https://app.netlify.com/start/deploy?repository=https://github.com/gatsbyjs/gatsby-starter-gatsby-starter-wordpress-blog)
## 🧐 What's inside?

Expand Down Expand Up @@ -92,8 +92,8 @@ Looking for more guidance? Full documentation for Gatsby lives [on the website](
## 💫 Deploy
[Build, Deploy, and Host On The Only Cloud Built For Gatsby](https://www.gatsbyjs.com/products/cloud/)
[Build, Deploy, and Host On Netlify](https://netlify.com)
Gatsby Cloud is an end-to-end cloud platform specifically built for the Gatsby framework that combines a modern developer experience with an optimized, global edge network.
The fastest way to combine your favorite tools and APIs to build the fastest sites, stores, and apps for the web. And also the best place to build, deploy, and host your Gatsby sites.
<!-- AUTO-GENERATED-CONTENT:END -->
10 changes: 5 additions & 5 deletions starters/hello-world/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ _Have another more specific idea? You may want to check out our vibrant collecti
Open the `my-hello-world-starter` directory in your code editor of choice and edit `src/pages/index.js`. Save your changes and the browser will update in real time!
## 🚀 Quick start (Gatsby Cloud)
## 🚀 Quick start (Netlify)
Deploy this starter with one click on [Gatsby Cloud](https://www.gatsbyjs.com/cloud/):
Deploy this starter with one click on [Netlify](https://app.netlify.com/signup):
[<img src="https://www.gatsbyjs.com/deploynow.svg" alt="Deploy to Gatsby Cloud">](https://www.gatsbyjs.com/dashboard/deploynow?url=https://github.com/gatsbyjs/gatsby-starter-hello-world)
[<img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify" />](https://app.netlify.com/start/deploy?repository=https://github.com/gatsbyjs/gatsby-starter-hello-world)
## 🧐 What's inside?

Expand Down Expand Up @@ -92,8 +92,8 @@ Looking for more guidance? Full documentation for Gatsby lives [on the website](
## 💫 Deploy
[Build, Deploy, and Host On The Only Cloud Built For Gatsby](https://www.gatsbyjs.com/products/cloud/)
[Build, Deploy, and Host On Netlify](https://netlify.com)
Gatsby Cloud is an end-to-end cloud platform specifically built for the Gatsby framework that combines a modern developer experience with an optimized, global edge network.
The fastest way to combine your favorite tools and APIs to build the fastest sites, stores, and apps for the web. And also the best place to build, deploy, and host your Gatsby sites.
<!-- AUTO-GENERATED-CONTENT:END -->

0 comments on commit 1ff9a11

Please sign in to comment.