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

(sync) Resolve conflicts with gatsby-i18n-source @ 90932a0 #38

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 2 additions & 28 deletions docs/contributing/organize-a-gatsby-event.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,12 @@
title: Organize a Gatsby Event
---

Interested in organizing a Gatsby event? We want to help build the Gatsby community in your area. If your event meets a few basic requirements listed below, you’ll be eligible to receive support from Gatsby such as Gatsby swag, \$300 for food, learning resources, and more. Get started by requesting event support below.

[Request Event Support](https://airtable.com/shrpwc99yogJm9sfI)
Our communiy event support offerings and process are undergoing some changes. Check back soon to see our updated community event support opportunities!

## What constitutes a Gatsby event?

A community organized Gatsby event can be a local meetup, a small conference, a _lunch and learn_ with coworkers, or a larger event. It’s up to you how many people you want to invite and how casual the environment. You can organize an event at your workplace or for the local community.

## What support does Gatsby provide?

There are several ways Gatsby may support your event:

- Promote event on the [Gatsbyjs.org Events Page](/contributing/events/)
- Promote event via [Gatsby’s Twitter handle](https://twitter.com/gatsbyjs)
- \$300 off food related expenses
- Free Gatsby stickers from the [Gatsby Swag Store](https://store.gatsbyjs.org/)
- 20% off swag in the [Gatsby Swag Store](https://store.gatsbyjs.org/) for your attendees
- Gatsby team member speaker (when available)

## Requirements

- The event must have at least half of the content focused on Gatsby or a Gatsby-related topic (such as JAMstack)
- Both US and international events qualify for support
- If you’re requesting the \$300 food credit, then you must submit a receipt for the expense
- The event must be in harmony with the [Gatsby Code of Conduct](/contributing/code-of-conduct/) and follow the [Gatsby brand guidelines](/guidelines/logo/)

## How do you qualify for Gatsby support?

To request support and submit your event to the Gatsby events page, apply at the link below.

[Request Event Support](https://airtable.com/shrpwc99yogJm9sfI)

## Related Links:
## Related Links

- [Gatsby's Community Events](/contributing/events/)
20 changes: 5 additions & 15 deletions docs/docs/add-404-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,16 @@
title: "Добавление страницы 404"
---

Для добавления страницы 404 создайте страницу, путь которой соответствует регулярному выражению
`^\/?404\/?$` (`/404/`, `/404`, `404/` или `404`). Как правило, React-компонент для такой страницы будет находиться по пути
`src/pages/404.js`.
Для добавления страницы 404 создайте страницу, путь которой соответствует регулярному выражению `^\/?404\/?$` (`/404/`, `/404`, `404/` или `404`). Как правило, React-компонент для такой страницы будет находиться по пути `src/pages/404.js`.

Gatsby позаботится о том, чтобы 404 страница была доступна как `404.html`, поскольку большинство хостингов
статичных файлов по умолчанию использует это имя файла для обработки ошибки 404. Если в вашем случае
это не так, то потребуется дополнительно настроить свой хостинг на использование именно этого файла для
страницы ошибки 404.
Gatsby позаботится о том, чтобы 404 страница была доступна как `404.html`, поскольку большинство хостингов статичных файлов по умолчанию использует это имя файла для обработки ошибки 404. Если в вашем случае это не так, то потребуется дополнительно настроить свой хостинг на использование именно этого файла для страницы ошибки 404.

Поскольку Gatsby по умолчанию создает эту страницу,
вам не нужно дополнительно настраивать его в файле `gatsby-node.js`.
Поскольку Gatsby по умолчанию создает эту страницу, вам не нужно дополнительно настраивать его в файле `gatsby-node.js`.

При разработке с помощью команды `gatsby develop`, Gatsby использует собственную страницу 404,
которая переопределяет вашу страницу 404. Тем не менее, вы всё равно можете посмотреть вашу страницу 404,
нажав "Preview custom 404 page", чтобы убедиться, что она корректно отображается. Это удобно
во время разработки, потому что можно посмотреть все доступные страницы.
которая переопределяет вашу страницу 404. Тем не менее, вы всё равно можете посмотреть вашу страницу 404, нажав "Preview custom 404 page", чтобы убедиться, что она корректно отображается. Это удобно во время разработки, потому что можно посмотреть все доступные страницы.

The screenshot below shows the default 404 page that Gatsby creates.
It also lists out all the pages on your website. Clicking the "Preview custom 404
page" button will allow you to view the 404 page you created.
The screenshot below shows the default 404 page that Gatsby creates. It also lists out all the pages on your website. Clicking the "Preview custom 404 page" button will allow you to view the 404 page you created.
![Gatsby Default 404 Page](./images/gatsby-default-404.png)

The screenshot below shows the custom 404 page.
Expand Down
43 changes: 13 additions & 30 deletions docs/docs/add-custom-webpack-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,22 @@
title: "Добавление пользовательской конфигурации webpack"
---

_Перед созданием пользовательского файла конфигурации Webpack поищите уже готовый
Gatsby-плагин, который решает вашу проблему, в
[разделе плагинов](/docs/plugins/). Если ничего найти не удалось, а ваш случай
распространен, пожалуйста, добавьте ваш плагин в Библиотеку Плагинов Gatsby,
чтобы другие люди смогли им воспользоваться (включая вас самого в будущем 😀)._

Чтобы добавить пользовательскую конфигурацию Webpack, создайте (если уже не создан)
`gatsby-node.js` файл в корневой директории. Внутри этого файла экспортируйте
функцию с именем `onCreateWebpackConfig`.

При создании собственной webpack-конфигурации Gatsby вызовет эту функцию,
позволяя вам изменить настройку webpack по умолчанию с помощью
[webpack-merge](https://github.com/survivejs/webpack-merge).

Gatsby генерирует ряд webpack-сборок с несколько отличной друг от друга конфигурацией.
Каждую из таких сборок мы называем "стадия". Существуют следующие стадии:

1. develop: при запуске `gatsby develop` команды. Включает настройку для горячей
перезагрузки и добавления CSS на страницу.
2. develop-html: то же самое, что и develop, но без react-hmre в конфигурации babel для
рендеринга HTML-компонента.
3. build-javascript: продакшен-сборка JavaScript и CSS. Создает как маршрут для JS-бандлов,
так и чанки с общим кодом для JS и CSS.
_Перед созданием пользовательского файла конфигурации Webpack поищите уже готовый Gatsby-плагин, который решает вашу проблему, в [разделе плагинов](/docs/plugins/). Если ничего найти не удалось, а ваш случай распространен, пожалуйста, добавьте ваш плагин в Библиотеку Плагинов Gatsby, чтобы другие люди смогли им воспользоваться (включая вас самого в будущем 😀)._

Чтобы добавить пользовательскую конфигурацию Webpack, создайте (если уже не создан) `gatsby-node.js` файл в корневой директории. Внутри этого файла экспортируйте функцию с именем `onCreateWebpackConfig`.

При создании собственной webpack-конфигурации Gatsby вызовет эту функцию, позволяя вам изменить настройку webpack по умолчанию с помощью [webpack-merge](https://github.com/survivejs/webpack-merge).

Gatsby генерирует ряд webpack-сборок с несколько отличной друг от друга конфигурацией. Каждую из таких сборок мы называем "стадия". Существуют следующие стадии:

1. develop: при запуске `gatsby develop` команды. Включает настройку для горячей перезагрузки и добавления CSS на страницу.
2. develop-html: то же самое, что и develop, но без react-hmre в конфигурации babel для рендеринга HTML-компонента.
3. build-javascript: продакшен-сборка JavaScript и CSS. Создает как маршрут для JS-бандлов, так и чанки с общим кодом для JS и CSS.
4. build-html: продакшен-сборка статических HTML-страниц.

Ознакомьтесь с
[webpack.config.js](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/utils/webpack.config.js)
в качестве источника.
Ознакомьтесь с [webpack.config.js](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/utils/webpack.config.js) в качестве источника.

Примеры использования этого API можно найти в плагинах из репозитория Gatsby,
например, [Sass](/packages/gatsby-plugin-sass/),
[TypeScript](/packages/gatsby-plugin-typescript/),
[Glamor](/packages/gatsby-plugin-glamor/) и многих других!
Примеры использования этого API можно найти в плагинах из репозитория Gatsby, например, [Sass](/packages/gatsby-plugin-sass/), [TypeScript](/packages/gatsby-plugin-typescript/), [Glamor](/packages/gatsby-plugin-glamor/) и многих других!

## Примеры

Expand Down
3 changes: 2 additions & 1 deletion docs/docs/adding-search-with-elasticlunr.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Adding search with elasticlunr
title: Adding Search with Elasticlunr
issue: https://github.com/gatsbyjs/gatsby/issues/21066
---

This is a stub. Help our community expand it.
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/audit-with-lighthouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ gatsby build
gatsby serve
```

Как только команда запустится, вы можете посмотреть сайт по адресу `localhost:9000`.
Как только команда запустится, вы можете посмотреть сайт по адресу `http://localhost:9000`.

### Запуск аудита с помощью Lighthouse

Запустим ваш первый тест в Lighthouse.

1. Откройте сайт в Chrome (если ещё не открыли в нём) и откройте инструменты разработки Chrome.

2. Нажмите на вкладку "Audits", где вы увидите экран, который выглядит примерно так:
2. Нажмите на вкладку "Audits", где вы увидите экран, который выглядит примерно так:

![Начальная страница аудита в Lighthouse](./images/lighthouse-audit.png)

Expand Down
20 changes: 5 additions & 15 deletions docs/docs/babel.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,19 @@
title: Babel
---

Gatsby uses the phenomenal project [Babel](https://babeljs.io/) to enable
support for writing modern JavaScript — while still supporting older browsers.
Gatsby uses the phenomenal project [Babel](https://babeljs.io/) to enable support for writing modern JavaScript — while still supporting older browsers.

## How to specify which browsers to support

Gatsby supports by default the last two versions of major browsers, IE 9+, as well as
any browser that still has 1%+ browser share.
Gatsby supports by default the last two versions of major browsers, IE 9+, as well as any browser that still has 1%+ browser share.

This means we automatically compile your JavaScript to ensure it works on older browsers.
We also automatically add polyfills as needed — no more shipping code which mysteriously
breaks on older browsers!
This means that your JavaScript is automatically compiled to ensure it works on older browsers. Polyfills are also automatically added — no more shipping code which mysteriously breaks on older browsers!

If you only target newer browsers, see the [Browser
Support](/docs/browser-support/) docs page for how to instruct Gatsby on which
browsers you support and then Babel will start compiling for only these
browsers.
If you only target newer browsers, see the [Browser Support](/docs/browser-support/) docs page for how to instruct Gatsby on which browsers you support and then Babel will start compiling for only these browsers.

## How to use a custom .babelrc file

Gatsby ships with a default .babelrc setup that should work for most sites. If you'd like
to add custom Babel presets or plugins, you can create your own `.babelrc` at the root of
your site, import [`babel-preset-gatsby`](https://github.com/gatsbyjs/gatsby/tree/master/packages/babel-preset-gatsby),
and add additional plugins, presets, and pass options to `babel-preset-gatsby`, e.g. `targets`.
Gatsby ships with a default .babelrc setup that should work for most sites. If you'd like to add custom Babel presets or plugins, you can create your own `.babelrc` at the root of your site, import [`babel-preset-gatsby`](https://github.com/gatsbyjs/gatsby/tree/master/packages/babel-preset-gatsby), and add additional plugins, presets, and pass options to `babel-preset-gatsby`, e.g. `targets`.

```shell
npm install --save-dev babel-preset-gatsby
Expand Down
36 changes: 7 additions & 29 deletions docs/docs/browser-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,21 @@
title: Browser Support
---

Gatsby supports
[the same browsers as the current stable version of React.js](https://facebook.github.io/react/docs/react-dom.html#browser-support)
which is currently IE9+ as well as the most recent versions of other popular
browsers.
Gatsby supports [the same browsers as the current stable version of React.js](https://facebook.github.io/react/docs/react-dom.html#browser-support) which is currently IE9+ as well as the most recent versions of other popular browsers.

## Polyfills

Gatsby leverages Babel 7's ability to automatically add polyfills for your
target browsers.
Gatsby leverages Babel 7's ability to automatically add polyfills for your target browsers.

Newer browsers support more JavaScript APIs than older browsers. For older
versions, Gatsby (via Babel) automatically adds the minimum "polyfills"
necessary for your code to work in those browsers.
Newer browsers support more JavaScript APIs than older browsers. For older versions, Gatsby (via Babel) automatically adds the minimum "polyfills" necessary for your code to work in those browsers.

If you start using a newer JavaScript API like `[].includes` that isn't
supported by some of your targeted browsers, you won't have to worry about it
breaking the older browsers as Babel will automatically add the needed polyfill
`core-js/modules/es7.array.includes`.
If you start using a newer JavaScript API like `[].includes` that isn't supported by some of your targeted browsers, you won't have to worry about it breaking the older browsers as Babel will automatically add the needed polyfill `core-js/modules/es7.array.includes`.

## Specify what browsers your project supports using "Browserslist"

You may customize your list of supported browser versions by declaring a
[`"browserslist"`](https://github.com/ai/browserslist) key within your
`package.json`. Changing these values will modify your JavaScript (via
[`babel-preset-env`](https://github.com/babel/babel-preset-env#targetsbrowsers))
and your CSS (via [`autoprefixer`](https://github.com/postcss/autoprefixer))
output.
You may customize your list of supported browser versions by declaring a [`"browserslist"`](https://github.com/ai/browserslist) key within your `package.json`. Changing these values will modify your JavaScript (via[`babel-preset-env`](https://github.com/babel/babel-preset-env#targetsbrowsers)) and your CSS (via [`autoprefixer`](https://github.com/postcss/autoprefixer)) output.

This article is a good introduction to the growing community of tools around
Browserslist — https://css-tricks.com/browserlist-good-idea/
This article is a good introduction to the growing community of tools around Browserslist — https://css-tricks.com/browserlist-good-idea/

By default, Gatsby emulates the following config:

Expand All @@ -41,11 +26,4 @@ By default, Gatsby emulates the following config:
}
```

If you only support newer browsers, make sure to specify this in your
`package.json`. This will often enable you to ship smaller JavaScript files.

## Note about IE < 11

React depends on collection types `Map` and `Set`. While these are not used by Gatsby, Gatsby uses React and you will need to polyfill these if you support older browsers and devices including IE < 11.

Read more about this in [ReactJS Docs - JavaScript Environment Requirements](https://reactjs.org/docs/javascript-environment-requirements.html)
If you only support newer browsers, make sure to specify this in your `package.json`. This will often enable you to ship smaller JavaScript files.
11 changes: 7 additions & 4 deletions docs/docs/building-an-e-commerce-site.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
---
title: Building an e-commerce site
title: Building an e-commerce Site
---

This is a stub. Help our community expand it.
The speed and performance of sites built with Gatsby make it a great tool for building e-commerce sites. There are existing plugins for connecting services like [Shopify](/packages/gatsby-source-shopify/) and [Snipcart](/packages/gatsby-plugin-snipcart/) to Gatsby, and this section contains reference guides to help get things setup.

Please use the [Gatsby Style Guide](/contributing/gatsby-style-guide/) to ensure your
pull request gets accepted.
To see examples of e-commerce sites built with Gatsby, check out the [showcase](/showcase/?filters%5B0%5D=eCommerce).

<GuideList slug={props.slug} />

_You can also check out the ["Making an e-commerce Site with Stripe" tutorial](/tutorial/ecommerce-tutorial/) for more information._