Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/gatsbyjs/gatsby into fix/g…
Browse files Browse the repository at this point in the history
  • Loading branch information
sagarnasit committed Oct 30, 2019
2 parents d85f4ab + 589c599 commit d950281
Show file tree
Hide file tree
Showing 509 changed files with 13,537 additions and 32,978 deletions.
15 changes: 0 additions & 15 deletions .flowconfig

This file was deleted.

13 changes: 8 additions & 5 deletions .github/ISSUE_TEMPLATE/new_translation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ about: Suggest a new language translation of the repo.
- *Name*: Language name in *English*
- *Code*: [ISO-693 Code]() or [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) of the language
- *Maintainers*: list of GitHub usernames of proposed maintainers (at least 2 required)
Each maintainer listed should respond to the issue with:
- your experience level in open source
- your level of experience in the target language and localization
-->

```yaml
Expand All @@ -23,3 +18,11 @@ maintainers:
- tesseralis
- marcysutton
```
**Maintainers**
If you would like to be a maintainer, please respond to this issue with:
- your experience level in open source
- your level of experience in the target language and localization
- how much time you can commit to being a maintainer
61 changes: 43 additions & 18 deletions .github/actions/gatsby-site-showcase-validator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,47 @@ const yaml = require("js-yaml")
const cheerio = require("cheerio")
const chalk = require("chalk")

async function fetchAsSiteValidator(url) {
return fetch(url, {
headers: {
"User-Agent":
"gatsby-site-showcase-validator/1.0 (+https://github.com/gatsbyjs/gatsby/tree/master/.github/actions/gatsby-site-showcase-validator)",
},
})
}

async function run() {
// Grab down sites.yml
let url =
const url =
"https://github.com/gatsbyjs/gatsby/master/docs/sites.yml"

let yamlStr

try {
yamlStr = await fetch(url).then(resp => resp.text())
yamlStr = await fetchAsSiteValidator(url).then(resp => resp.text())
} catch (err) {
console.log(`[Err]: ${err.message}`)
process.exit(1)
}

// Parse YAML
let parsedYaml = yaml.safeLoad(yamlStr, "utf8")
const parsedYaml = yaml.safeLoad(yamlStr, "utf8")

let sitesVisited = 0
let nonGatsbySiteCount = 0
let inaccessibleRepoCount = 0
let erroredOut = 0
let totalSitesCount = parsedYaml.length
const totalSitesCount = parsedYaml.length

// Loop over each site
for (let site of parsedYaml) {
let siteUrl = site.main_url

const siteUrl = site.main_url
const sourceUrl = site.source_url
let siteHtml

// Fetch site
try {
siteHtml = await fetch(siteUrl).then(resp => resp.text())
siteHtml = await fetchAsSiteValidator(siteUrl).then(resp => resp.text())
} catch (err) {
console.log(
`${chalk.red(`[Err]`)}: ${site.title} (${siteUrl}) ran into an error: ${
Expand All @@ -47,34 +57,49 @@ async function run() {
}

// Pass html into a parser
let $ = cheerio.load(siteHtml)
const $ = cheerio.load(siteHtml)

// Most Gatsby sites have an id of "___gatsby"
let gatsbyContainer = $("#___gatsby")
const gatsbyContainer = $("#___gatsby")

if (gatsbyContainer.length !== 0) {
// The site is a gatsby site don't do anything
sitesVisited++
} else {
// The site is not a gatsby site, print out some info
// The site is not a gatsby site, print out some info
if (!gatsbyContainer.length) {
console.log(
`${chalk.yellow(`[Notice]`)}: ${
site.title
} (${siteUrl}) is not a Gatsby site`
)
sitesVisited++
nonGatsbySiteCount++
}

// Check if provided repository is public
if (sourceUrl) {
const status = await fetchAsSiteValidator(sourceUrl).then(
({ status }) => status
)

if (status !== 200) {
console.log(
`${chalk.yellow(`[Notice]`)}: ${
site.title
} (${siteUrl}) provided a 'source_url', but it's repository is inaccessible (${sourceUrl})`
)
inaccessibleRepoCount++
}
}

sitesVisited++
}

console.log(
chalk.green(
`We visited ${sitesVisited}/${totalSitesCount} sites. Out of them, ${nonGatsbySiteCount} sites were not a Gatsby site and ${erroredOut} errored out when visiting it.`
`We visited ${sitesVisited}/${totalSitesCount} sites. Out of them, ${nonGatsbySiteCount} sites were not a Gatsby site, ${inaccessibleRepoCount} provided inaccessible repositories, and ${erroredOut} errored out when visiting it.`
)
)

// If there are any non Gatsby sites, fail (non-zero exit code)
process.exit(nonGatsbySiteCount > 0 ? 1 : 0)
// If there are any non Gatsby sites or their `source_url` is inaccessible, fail (non-zero exit code)
const exitCode = nonGatsbySiteCount > 0 || inaccessibleRepoCount > 0 ? 1 : 0
process.exit(exitCode)
}

run()
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</h1>

<h3 align="center">
⚛️ 📄 :rocket:
⚛️ 📄 🚀
</h3>
<h3 align="center">
Fast in every way that matters
Expand Down
75 changes: 0 additions & 75 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/blog/2017-07-19-creating-a-blog-with-gatsby/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ generated content.
Gatsby [recently released][gatsby-release] a v1.0.0 with a bunch of new
features, including (but not limited to) the ability to create content queries
with GraphQL, integration with various CMSs--including WordPress, Contentful,
Drupal, etc., and route based code splitting to keep the end-user experience as
Drupal, etc., and route based code splitting to keep the end user experience as
snappy as possible. In this post, we'll take a deep dive into Gatsby and some of
these new features by creating a static blog. Let's get on it!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,6 @@ paradigms like Serverless, I predict it could be very far.

But whatever that limit is, I am quite sure that this is a step in the right
direction towards making the web a safer, faster and more enjoyable experience
for both developers and end-users.
for both developers and end users.

<div style="width:100%;height:0;padding-bottom:52%;position:relative;"><iframe src="https://giphy.com/embed/12xSrwKxHxB3BS" width="100%" height="100%" style="position:absolute" frameBorder="0" class="giphy-embed" allowFullScreen></iframe></div><p><a href="https://giphy.com/gifs/black-and-white-end-ending-12xSrwKxHxB3BS">via GIPHY</a></p>
6 changes: 3 additions & 3 deletions docs/blog/2018-1-18-strapi-and-gatsby/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ tags: ["blogs", "cms", "headless-cms", "getting-started"]

![Showing the idea of using Gatsby with Strapi ](gatsby-strapi.png)

A static website contains Web pages with fixed content. Technically, it is a simple list of HTML files, which displays the same information to every visitor. Unlike dynamic websites, they do not require any back-end programming or database. Publishing a static website is easy: the files are uploaded on a simple Web server or storage provider. The two main advantages of static websites are security and speed: there is no database so it can not be hacked and there is no need to render a page for each request, which makes Web browsing faster.
A static website contains Web pages with fixed content. Technically, it is a simple list of HTML files, which displays the same information to every visitor. Unlike dynamic websites, they do not require any backend programming or database. Publishing a static website is easy: the files are uploaded on a simple Web server or storage provider. The two main advantages of static websites are security and speed: there is no database so it can not be hacked and there is no need to render a page for each request, which makes Web browsing faster.

To make their creation easier, numerous open-source static websites generators are available: [Jekyll](https://jekyllrb.com/), [Hugo](https://gohugo.io/), [Hexo](https://hexo.io/), etc. Most of the time, the content is managed through static (ideally Markdown) files or a Content API. Then, the generator requests the content, injects it in templates defined by the developer and generates a bunch of HTML files.

Progressive Web Apps (PWA) are web applications, highly based on JavaScript, and are [reliable, fast and engaging](https://developers.google.com/web/progressive-web-apps/). Since they make web browsing much faster and offer a better user experience, PWA have become the default way to build Web interfaces. Thus, many amazing front-end frameworks appeared over the last couple years: Angular, React and more recently, Vue.
Progressive Web Apps (PWA) are web applications, highly based on JavaScript, and are [reliable, fast and engaging](https://developers.google.com/web/progressive-web-apps/). Since they make web browsing much faster and offer a better user experience, PWA have become the default way to build Web interfaces. Thus, many amazing frontend frameworks appeared over the last couple years: Angular, React and more recently, Vue.

> Gatsby: when static websites meet Progressive Web Apps
Expand All @@ -32,7 +32,7 @@ Created by [Kyle Mathews](https://twitter.com/kylemathews), the project was offi

## What is Strapi?

[Strapi](https://strapi.io) is an _open source **Headless CMS Front-End Developers Love**_. It's more than a [Node.js Framework and more than a Headless CMS](https://strapi.io/overview), it saves weeks of API development time, and allows easy long-term content management through a beautiful administration panel _anyone can use_.
[Strapi](https://strapi.io) is an _open source **Headless CMS Frontend Developers Love**_. It's more than a [Node.js Framework and more than a Headless CMS](https://strapi.io/overview), it saves weeks of API development time, and allows easy long-term content management through a beautiful administration panel _anyone can use_.

![The Strapi Logo](logo-strapi.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This process of creative destruction tends to begin within the infrastructure se

## Where Have We Come From?

During the late-1980s the industry converged around the client-server model. While there were challengers, eventually Windows (it took until version 3.1!) emerged as the dominant end-user client environment. The applications in this era were relatively small, specific to a single operating system, and typically built for hundreds or thousands of users. In designing these applications, the choice was really whether you put the business logic directly into the client application or pushed it down into the database. Unix systems became the dominant server platforms largely based upon database performance requirements.
During the late-1980s the industry converged around the client-server model. While there were challengers, eventually Windows (it took until version 3.1!) emerged as the dominant end user client environment. The applications in this era were relatively small, specific to a single operating system, and typically built for hundreds or thousands of users. In designing these applications, the choice was really whether you put the business logic directly into the client application or pushed it down into the database. Unix systems became the dominant server platforms largely based upon database performance requirements.

The availability of the internet, and the birth of the browser — thank you, Marc Andreessen — greatly simplified cross-platform client development. However, these new applications now had to support several orders of magnitude more users. Consequently, several new tiers were added to the architecture: the web server and the application server. The web server and associated proxies and load balancers provided a stateless layer to handle the presentation layer. The application server became the obvious place for the business logic and to manage the interaction with the (typically relational) database server.

Expand Down
2 changes: 1 addition & 1 deletion docs/blog/2018-10-04-journey-to-the-content-mesh/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Change is being spurred by the confluence of three revolutions in how we create

These technological changes have made modern web technology both _essential_ for creating fresh, novel, and engaging digital experiences, and _more accessible_ for the enterprise.

Each change primarily affects a different stakeholder --- marketing, development/IT, and the end-user, respectively.
Each change primarily affects a different stakeholder --- marketing, development/IT, and the end user, respectively.

The key challenge is that without a content mesh, integrating these systems together is a lot of work. Forrester titled one of their [report sections](https://www.tangomodem.com/wp-content/uploads/2017/09/the-rise-of-the-headless-cms.pdf): "Warning: Headless Content Management Is For Do-It-Yourself Shops." But _with_ a content mesh, all of these systems can be brought together in a unified, low-cost, low-defect whole.

Expand Down
4 changes: 2 additions & 2 deletions docs/blog/2018-11-07-gatsby-for-apps/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ Next: let's compare and contrast the end user experience of fetching authenticat

### The App Shell

In merely adding the [`gatsby-plugin-offline`][gatsby-plugin-offline] plugin, we enable a fully-featured, progressive web application that works offline and creates an app shell by registering a service worker. An app shell is essentially separate components of your application (e.g. header, footer, sidebar, etc.) that are instantly available from a service worker while dynamic content is fetched in the background. This creates a great end-user experience, as the application is able to visually populate instantly as data loads into place in the background.
In merely adding the [`gatsby-plugin-offline`][gatsby-plugin-offline] plugin, we enable a fully-featured, progressive web application that works offline and creates an app shell by registering a service worker. An app shell is essentially separate components of your application (e.g. header, footer, sidebar, etc.) that are instantly available from a service worker while dynamic content is fetched in the background. This creates a great end user experience, as the application is able to visually populate instantly as data loads into place in the background.

If we consider this approach, the technique looks like the following:

Expand Down Expand Up @@ -213,7 +213,7 @@ Additionally, Gatsby Mail shows some specific web application functionality, suc
- GraphQL at build time and _run time_ utilizing a remote GraphQL API and [apollo-boost][apollo-boost], and
- loading an app shell with `gatsby-plugin-offline` (check out the "Fast 3G" example below!)

and even a light/dark theme, because why not! You can see all of these concepts unify to form this great end-user experience in the below example with a simulated fast 3G connection. The app shell (header, footer, etc.) loads into place _instantly_ as the dynamic content is fetched (from the remote GraphQL API!) in the background.
and even a light/dark theme, because why not! You can see all of these concepts unify to form this great end user experience in the below example with a simulated fast 3G connection. The app shell (header, footer, etc.) loads into place _instantly_ as the dynamic content is fetched (from the remote GraphQL API!) in the background.

![App Shell with Gatsby Mail](./images/gatsby-mail-app-shell.gif)

Expand Down
2 changes: 1 addition & 1 deletion docs/blog/2018-12-17-ibm-case-study/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The main goals for the new site were simple:

## Easy onboarding with Gatsby

Alison Joseph, Front-End Developer at IBM, took over this project from a coworker who had already done great work choosing the framework for the website rebuild. Taking on a new project mid-stream can be daunting but Alison found the Gatsby documentation was top notch and better than any other open source docs she’s seen.
Alison Joseph, Frontend Developer at IBM, took over this project from a coworker who had already done great work choosing the framework for the website rebuild. Taking on a new project mid-stream can be daunting but Alison found the Gatsby documentation was top notch and better than any other open source docs she’s seen.

Alison was the only developer able to focus full-time on the Gatsby project and it took about six months before the new site launched in October 2018. She’s quick to point out if they had gone the custom, in-house route, the project would have easily taken twice as long and required more than one developer.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ In this post, I want to explain how Gatsby led me into learning React and how yo

## The beginnings

When I first discovered Gatsby two years ago, React was already quite popular. I decided to learn it to get more into modern front-end development and to step up my game. Before that I did **static** HTML/CSS/JS websites with the help of SCSS and Gulp. I never used a server-side scripting language (e.g. PHP) or a scripting engine (e.g. Nunjucks). So this was a big step, wasn't it?
When I first discovered Gatsby two years ago, React was already quite popular. I decided to learn it to get more into modern frontend development and to step up my game. Before that I did **static** HTML/CSS/JS websites with the help of SCSS and Gulp. I never used a server-side scripting language (e.g. PHP) or a scripting engine (e.g. Nunjucks). So this was a big step, wasn't it?

<Pullquote>
Gatsby offers you a playground to learn React.
Expand Down
Loading

0 comments on commit d950281

Please sign in to comment.