Skip to content

Commit

Permalink
Merge branch 'master' into admin/plugin-search
Browse files Browse the repository at this point in the history
  • Loading branch information
mxstbr authored Jul 21, 2020
2 parents 7c37cc6 + a0c70d0 commit b619428
Show file tree
Hide file tree
Showing 13 changed files with 58 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Gatsby is a modern web framework for blazing fast websites.
to load your data, then develop using Gatsby’s uniform GraphQL interface.

- **Performance Is Baked In.** Ace your performance audits by default. Gatsby automates code
splitting, image optimization, inlining critical styles, lazy-loading, and prefetching resources,
splitting, image optimization, inlining critical styles, lazy-loading, prefetching resources,
and more to ensure your site is fast — no manual tuning required.

- **Host at Scale for Pennies.** Gatsby sites don’t require servers so you can host your entire
Expand Down
2 changes: 1 addition & 1 deletion dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ CodeName
Codenames
codeowner
codeowners
Codepen
CodePen
CodeSandbox
codesplitting
collegial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@ npm install tailwindcss gatsby-plugin-postcss

2. Add `gatsby-plugin-postcss` to your `gatsby-config.js` file

```javascript
```javascript:title=gatsby-config.js
{
plugins: [`gatsby-plugin-postcss`]
}
```

3. Create a `postcss.config.js` file and add the following snippet to it:

```javascript
```javascript:title=postcss.config.js
module.exports = {
plugins: [require("tailwindcss"), require("autoprefixer")],
}
```

4. Create a `tailwind.config.js` file and add the following snippet to it:

```javascript
```javascript:title=tailwind.config.js
module.exports = {
purge: ["./src/**/*.js"],
theme: {
Expand All @@ -65,7 +65,7 @@ module.exports = {

5. Create a `tailwind.css` file and add the following snippet to it:

```css
```css:title=tailwind.css
@tailwind base;
@tailwind components;
@tailwind utilities;
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/building-a-contact-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Getform is a form backend platform which offers a free-plan for handling form su

Once you've made the code changes to your form, you can head over to the contact page on your site and start submitting data to the form. The submissions will then be visible on the Getform dashboard. You can add multiple email addresses to receive email notifications for the forms created, as well as manipulate the data you see on Getform using Zapier and Webhooks options that are offered.

You can find more info on the registration process and form setup on the [Getform website](https://getform.io/) and find code examples (AJAX, reCAPTCHA etc) on their [Codepen](https://codepen.io/getform).
You can find more info on the registration process and form setup on the [Getform website](https://getform.io/) and find code examples (AJAX, reCAPTCHA etc) on their [CodePen](https://codepen.io/getform).

### Netlify

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/localization-i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ URL - /**en**/about

React-intl is a part of the FormatJS set of i18n libraries and provides support for over 150+ languages. It builds on JavaScript's [Internationalization API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl) providing enhanced APIs and components. React-intl uses React context and HOCs (Higher Order Components) to provide translations allowing you to dynamically load language modules as you need them. There are also polyfill options available for older browsers that do not support the base JavaScript i18n API.

More detailed information about react-intl's [APIs](https://github.com/formatjs/react-intl/blob/master/docs/API.md) and [components](https://github.com/formatjs/react-intl/blob/master/docs/Components.md), including [demos](https://github.com/formatjs/react-intl/tree/master/examples), are available in the [documentation](https://github.com/formatjs/react-intl/tree/master/docs).
More detailed information about react-intl's [APIs](https://github.com/formatjs/formatjs/blob/main/website/docs/react-intl/api.md) and [components](https://github.com/formatjs/formatjs/blob/main/website/docs/react-intl/components.md), including [demos](https://github.com/formatjs/formatjs/tree/main/packages/react-intl/examples), are available in the [documentation](https://github.com/formatjs/formatjs/tree/main/website/docs/react-intl).

### react-i18next

Expand Down
15 changes: 15 additions & 0 deletions docs/sites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11471,3 +11471,18 @@
built_by: HiringSolved
built_by_url: https://hiringsolved.com/home/
featured: false
- title: MongoDB Developer Hub
url: https://developer.mongodb.com
main_url: https://developer.mongodb.com
description: >
The MongoDB Developer Hub serves as the central location for all MongoDB developer content, programs, and resources.
categories:
- Blog
- Data
- Education
- Learning
- Programming
- Technology
- Web Development
built_by: MongoDB
featured: false
2 changes: 1 addition & 1 deletion examples/using-css-modules/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class IndexComponent extends React.Component {
className={indexStyles.link}
href="https://github.com/gatsbyjs/gatsby/tree/master/examples/using-css-modules"
>
cODe for eXAMple sIte on GiTHUb
Code for example site on GitHub
</a>
</p>
</div>
Expand Down
40 changes: 25 additions & 15 deletions packages/gatsby-admin/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ const Index: React.FC<{}> = () => {
const [{ data, fetching, error }] = useQuery({
query: `
{
allGatsbyPage {
nodes {
path
}
}
allGatsbyPlugin {
nodes {
name
Expand All @@ -106,24 +111,29 @@ const Index: React.FC<{}> = () => {
if (error) return <p>Oops something went wrong.</p>

return (
<Flex gap={7} flexDirection="column" sx={{ paddingY: 7, paddingX: 6 }}>
<SectionHeading id="plugin-search-label">Plugins</SectionHeading>
<Grid gap={6} columns={[1, 1, 1, 2, 3]}>
{data.allGatsbyPlugin.nodes
.filter(plugin => plugin.name.indexOf(`gatsby-plugin`) === 0)
.map(plugin => (
<PluginCard key={plugin.id} plugin={plugin} />
<Flex gap={7} flexDirection="column" sx={{ paddingY: 7, paddingX: 6 }}
<SectionHeading>Pages</SectionHeading>
<ul sx={{ pl: 0, listStyle: `none` }}>
{data.allGatsbyPage.nodes
.filter(page => page.path.indexOf(`/dev-404-page/`) !== 0)
.sort((a, b) => a.path.localeCompare(b.path))
.map(page => (
<li
key={page.path}
sx={{
py: 1,
}}
>
{page.path}
</li>
))}
</Grid>
<PluginSearchBar />
</ul>

<SectionHeading>Themes</SectionHeading>
<SectionHeading id="plugin-search-label">Installed Plugins</SectionHeading>
<Grid gap={6} columns={[1, 1, 1, 2, 3]}>
{data.allGatsbyPlugin.nodes
.filter(plugin => plugin.name.indexOf(`gatsby-theme`) === 0)
.map(plugin => (
<PluginCard key={plugin.id} plugin={plugin} />
))}
{data.allGatsbyPlugin.nodes.map(plugin => (
<PluginCard key={plugin.id} plugin={plugin} />
))}
</Grid>
<PluginSearchBar />
</Flex>
Expand Down
1 change: 1 addition & 0 deletions packages/gatsby-plugin-google-analytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ This plugin supports all optional Create Only Fields documented in [Google Analy
- `alwaysSendReferrer`: boolean
- `allowAnchor`: boolean
- `cookieName`: string
- `cookieFlags`: string
- `cookieDomain`: string, defaults to `'auto'` if not given
- `cookieExpires`: number
- `storeGac`: boolean
Expand Down
1 change: 1 addition & 0 deletions packages/gatsby-plugin-google-analytics/src/gatsby-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const knownOptions = {
alwaysSendReferrer: `boolean`,
allowAnchor: `boolean`,
cookieName: `string`,
cookieFlags: `string`,
cookieExpires: `number`,
storeGac: `boolean`,
legacyCookieDomain: `string`,
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-recipes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ NPM packages, installing plugins, creating pages, etc.
It's designed to be extensible so new capabilities can be added which allow
Recipes to automate more things.

We chose MDX to allow for a literate programming style of writing recipes which
We chose [MDX](https://mdxjs.com/) to allow for a literate programming style of writing recipes which
enables us to port our dozens of recipes from
https://www.gatsbyjs.org/docs/recipes/ as well as in the future, entire
tutorials.
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-source-shopify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ The following data types are available:
| **ProductOption** | Custom product property names. |
| **ProductVariant** | Represents a different version of a product, such as differing sizes or differing colors. |
| **ShopPolicy** | Policy that a merchant has configured for their store, such as their refund or privacy policy. |
| **ShopDetails** | Name, Description and Currency that a merchant has configured for their store. |
| **ShopDetails** | Name, description and money format that a merchant has configured for their store. |

For each data type listed above, `shopify${typeName}` and
`allShopify${typeName}` is made available. Nodes that are closely related, such
Expand Down
6 changes: 5 additions & 1 deletion packages/gatsby/src/utils/get-static-dir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ export const copyStaticDirs = (): void => {
// filter out the static folders that don't exist
.filter(themeStaticPath => fs.existsSync(themeStaticPath))
// copy the files for each folder into the user's build
.map(folder => fs.copySync(folder, nodePath.join(process.cwd(), `public`)))
.map(folder =>
fs.copySync(folder, nodePath.join(process.cwd(), `public`), {
dereference: true,
})
)

const staticDir = nodePath.join(process.cwd(), `static`)
if (!fs.existsSync(staticDir)) return undefined
Expand Down

0 comments on commit b619428

Please sign in to comment.