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 autosaves between loki and redux #2

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3420b84
sync autosaves between loki and redux
Moocar Nov 24, 2018
c7fed0d
remove console.log
Moocar Nov 24, 2018
2530718
feat(www): Updated blog and newsletter section on homepage (#10024)
greglobinski Nov 27, 2018
fbe4fcb
Fix/4459/excerpt formatting ignored (#9716)
nadrane Nov 27, 2018
a3e505c
chore(release): Publish
DSchau Nov 27, 2018
6b06942
fix(www): Update "View all" component (#10170)
LekoArts Nov 27, 2018
b4e738e
Merge branch 'add-loki-nodes-db' into sync-db-autosaves
Moocar Nov 27, 2018
329f90b
Added joinup.io to site showcase (#10171)
ngoumard Nov 28, 2018
de03277
add jacobdcastro.com to site showcase (#10176)
Nov 28, 2018
5ebaa88
docs(gatsby-link): don't pass activeClassName prop to html anchor (#1…
walker-tx Nov 28, 2018
992cd53
docs(gatsby-link): add example of passing state (#10137)
GarrettJMU Nov 28, 2018
90ed649
fix(www): fix newsletter form style on blog post pages (#10180)
greglobinski Nov 28, 2018
be14610
fix(www): add arrow icon to 'View all Posts' button (#10183)
greglobinski Nov 28, 2018
9fc25f3
fix(gatsby): fix infinite reloads when resources fail (#10141)
vtenfys Nov 28, 2018
ad86cc8
chore(release): Publish
pieh Nov 28, 2018
140679c
feat(showcase): add www.gatsbytutorials.com and www.upandrunningtutor…
ooloth Nov 28, 2018
0c31478
chore(www): bump gatsby version (#10192)
pieh Nov 28, 2018
b7d4656
fix(gatsby-transformer-remark): properly bubble up errors thrown in s…
tmfelwu Nov 28, 2018
49100e9
fix(gatsby-plugin-netlify-cms): dynamically import netlify-identity-w…
alexandernanberg Nov 29, 2018
28ac889
chore(gatsby-transformer-remark): update gitignore (#10199)
pieh Nov 29, 2018
a3e5489
chore(release): Publish
pieh Nov 29, 2018
4bcca2a
feat(gatsby): add lokijs nodes db implementation (#9919)
Moocar Nov 29, 2018
38fd2b9
chore(release): Publish
pieh Nov 29, 2018
043b43b
Gatsby-Starter-Business Updated to Gatsby v2 along with new features …
v4iv Nov 29, 2018
994ac97
Documentation fix: Execute trailing slash stripping function, rather …
stevetweeddale Nov 29, 2018
228a866
feat(docs): Add accessibility doc (#10006)
enzoferey Nov 29, 2018
71d7f23
fix(gatsby-remark-prismjs): prevent additional blank line from appear…
DSchau Nov 29, 2018
83421d4
Merge branch 'master' into sync-db-autosaves
Moocar Nov 29, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/blog/2018-09-27-reach-router/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Related Gatsby docs:
- [V2 Migration Guide](/docs/migrating-from-v1-to-v2/#migrate-from-react-router-to-reachrouter)
- [Gatsby Link API reference](/docs/gatsby-link/)
- [V2 announcement blog post](/blog/2018-09-17-gatsby-v2/)
- [Making your site accessible](/docs/making-your-site-accessible)

External references:

Expand Down
1 change: 1 addition & 0 deletions docs/blog/2018-11-07-gatsby-for-apps/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ tags:
- applications
- beyond static
excerpt: Gatsby is great for not only static sites but also traditional web applications. Using Gatsby enables the benefits of both static and web applications so you don't have to sacrifice the advantages of one approach to reap the benefits of the other.
cover: images/what-if-i-told-you.jpg
---

Gatsby is great for static sites. You probably know this! It’s equally great for web applications. You may not know this. Gatsby is great for building web experiences that leverage the benefits of both so called static sites and web applications -- simultaneously. You don't have to sacrifice the advantages of one approach to reap the benefits of the other.
Expand Down
4 changes: 3 additions & 1 deletion docs/docs/creating-and-modifying-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,16 @@ _Note: There's also a plugin that will remove all trailing slashes from pages au
[gatsby-plugin-remove-trailing-slashes](/packages/gatsby-plugin-remove-trailing-slashes/)_.

```javascript:title=gatsby-node.js
// Replacing '/' would result in empty string which is invalid
const replacePath = path => (path === `/` ? path : path.replace(/\/$/, ``))
// Implement the Gatsby API “onCreatePage”. This is
// called after every page is created.
exports.onCreatePage = ({ page, actions }) => {
const { createPage, deletePage } = actions
return new Promise(resolve => {
const oldPage = Object.assign({}, page)
// Remove trailing slash unless page is /
page.path = _path => (_path === `/` ? _path : _path.replace(/\/$/, ``))
page.path = replacePath(page.path)
if (page.path !== oldPage.path) {
// Replace new page with old page
deletePage(oldPage)
Expand Down
43 changes: 38 additions & 5 deletions docs/docs/gatsby-link.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,41 @@ render () {
}
```

You can also pass state to pages when you navigate e.g. `navigate("/a-path/", { state: { pleasant: "reasonably" }}`

Note that `navigate` was previously named `navigateTo`. `navigateTo` is deprecated in Gatsby v2.

## Passing state through Link and Navigate

You can pass state to pages when you navigate, such as:

```javascript
navigate(`/a-path/`, { state: { pleasant: `reasonably` }}
```

You can also pass state to pages when you use `Link`:

```jsx
<Link
to="/another-page/"
activeStyle={{
color: "red",
}}
state={{
pleasant: "reasonably",
}}
>
```

This is accessible from the `location` object on the new page:

```javascript
componentDidMount() {
const pleasant = this.props.location.state.pleasant
this.setState({
pleasant: pleasant
})
}
```

## Prefixed paths helper

It is common to host sites in a sub-directory of a site. Gatsby lets you [set
Expand Down Expand Up @@ -136,7 +167,9 @@ following may be a good starting point:
```jsx
import { Link as GatsbyLink } from "gatsby"

const Link = ({ children, to, ...other }) => {
// Since DOM elements <a> cannot receive activeClassName,
// destructure the prop here and pass it only to GatsbyLink
const Link = ({ children, to, activeClassName, ...other }) => {
// Tailor the following test to your environment.
// This example assumes that any internal link (intended for Gatsby)
// will start with exactly one slash, and that anything else is external.
Expand All @@ -145,7 +178,7 @@ const Link = ({ children, to, ...other }) => {
// Use Gatsby Link for internal links, and <a> for others
if (internal) {
return (
<GatsbyLink to={to} {...other}>
<GatsbyLink to={to} activeClassName={activeClassName} {...other}>
{children}
</GatsbyLink>
)
Expand All @@ -164,7 +197,7 @@ export default Link

You can similarly check for file downloads:

```
```jsx
const file = /\.[0-9a-z]+$/i.test(to)

...
Expand Down
37 changes: 37 additions & 0 deletions docs/docs/making-your-site-accessible.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: "Making your site accessible"
---

## What is accessibility?

Back in the early days of the Web, Tim Berners-Lee, inventor of the World Wide Web, [said](https://www.w3.org/Press/IPO-announce):

> "The power of the Web is in its universality.
> Access by everyone regardless of disability is an essential aspect."

The web of today is an important resource in many aspects of life such as health care, education, or commerce. Accessibility is an important consideration when building for the web.

[Web accessibility](https://www.w3.org/WAI/fundamentals/accessibility-intro/#what) means that websites, tools, and technologies are designed and developed so that people with disabilities can use them. But not only people with permanent disabilities benefit from it. Accessibility also benefits people with temporary disabilities. For example imagine being in a environment where you cannot listen to audio or if you had a broken arm.

Accessibility [supports](https://www.w3.org/standards/webdesign/accessibility#case) social inclusion for everyone, and has a strong business case.

## Gatsby helps build in accessibility

While ultimately it's up to you to develop your site with accessibility in mind, Gatsby aims to provide as much out-of-the-box support as possible.

### Accessible routing

One of the most common features of every site is navigation. People should be able to navigate across your pages and content in an intuitive and accessible way.

That's why every Gatsby site has an accessible navigation experience by default.

It is possible thanks to [@reach/router](https://reach.tech/router), a routing library for React, that provides focus management on page change. It also has a ~70% smaller bundle size than the famous [react-router](https://github.com/ReactTraining/react-router).

Since the [second major release](https://www.gatsbyjs.org/blog/2018-09-17-gatsby-v2/), your Gatsby sites use `@reach/router` under the hood. The [Gatsby Link Component](https://www.gatsbyjs.org/docs/gatsby-link/) wraps [@reach/router's Link component](https://reach.tech/router/api/Link), so you don't need to think about it.

## How to improve accessibility?

Accessibility by default is a win for everyone. Learn more about web accessibility in general:

- [Free course](https://www.udacity.com/course/web-accessibility--ud891) by Google and Udacity.
- [WebAIM introduction](https://webaim.org/intro/) to web accessibility.
48 changes: 48 additions & 0 deletions docs/sites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3563,3 +3563,51 @@
built_by: Samuel Fialho
built_by_url: https://samuelfialho.com
featured: false
- title: JoinUp HR chatbot
url: https://www.joinup.io
main_url: https://www.joinup.io
description: Custom HR chatbot for better candidate experience
categories:
- App
- Chatbot
- HR
- Technology
featured: false
- title: JDCastro Web Design & Development
main_url: https://jacobdcastro.com
url: https://jacobdcastro.com
source_url: https://github.com/jacobdcastro/personal-site
featured: false
description: >
A small business site for freelance web designer and developer Jacob D. Castro. Includes professional blog, contact forms, and soon-to-come portfolio of sites for clients. Need a new website or an extra developer to share the workload? Feel free to check out the website!
categories:
- Blog
- Portfolio
- Business
- Freelance
built_by: Jacob D. Castro
built_by_url: https://twitter.com/jacobdcastro
- title: Gatsby Tutorials
main_url: https://www.gatsbytutorials.com
url: https://www.gatsbytutorials.com
source_url: https://github.com/ooloth/gatsby-tutorials
featured: false
description: >
Gatsby Tutorials is a community-updated list of video, audio and written tutorials to help you learn GatsbyJS.
categories:
- Web Development
- Education
- Open Source
built_by: Michael Uloth
built_by_url: "https://www.michaeluloth.com"
- title: Up & Running Tutorials
main_url: https://www.upandrunningtutorials.com
url: https://www.upandrunningtutorials.com
featured: false
description: >
Free coding tutorials for web developers. Get your web development career up and running by learning to build better, faster websites.
categories:
- Web Development
- Education
built_by: Michael Uloth
built_by_url: "https://www.michaeluloth.com"
5 changes: 5 additions & 0 deletions docs/starters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@
- PWA
- Netlify CMS
- Disqus
- Search
- Pagination
features:
- Complete Business Website Suite - Home Page, About Page, Pricing Page, Contact Page and Blog
- Netlify CMS for Content Management
Expand All @@ -216,6 +218,9 @@
- Progressive Web App & Offline Support
- Tags and RSS Feed for Blog
- Disqus and Share Support
- Elastic-Lunr Search
- Pagination
- Easy Configuration using `config.js` file
- url: https://haysclark.github.io/gatsby-starter-casper/
repo: https://github.com/haysclark/gatsby-starter-casper
description: n/a
Expand Down
6 changes: 6 additions & 0 deletions packages/babel-plugin-remove-graphql-queries/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

<a name="2.5.2"></a>

## [2.5.2](https://github.com/gatsbyjs/gatsby/compare/babel-plugin-remove-graphql-queries@[email protected]) (2018-11-29)

**Note:** Version bump only for package babel-plugin-remove-graphql-queries

<a name="2.5.1"></a>

## [2.5.1](https://github.com/gatsbyjs/gatsby/compare/babel-plugin-remove-graphql-queries@[email protected]) (2018-10-29)
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-plugin-remove-graphql-queries/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "babel-plugin-remove-graphql-queries",
"version": "2.5.1",
"version": "2.5.2",
"author": "Jason Quense <[email protected]>",
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"babel-preset-gatsby-package": "^0.1.2"
"babel-preset-gatsby-package": "^0.1.3"
},
"license": "MIT",
"main": "index.js",
Expand Down
8 changes: 8 additions & 0 deletions packages/babel-preset-gatsby-package/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

<a name="0.1.3"></a>

## [0.1.3](https://github.com/gatsbyjs/gatsby/compare/[email protected]@0.1.3) (2018-11-29)

### Bug Fixes

- **gatsby-plugin-netlify-cms:** dynamically import netlify-identity-widget ([#9565](https://github.com/gatsbyjs/gatsby/issues/9565)) ([49100e9](https://github.com/gatsbyjs/gatsby/commit/49100e9))

<a name="0.1.2"></a>

## [0.1.2](https://github.com/gatsbyjs/gatsby/compare/[email protected]@0.1.2) (2018-10-29)
Expand Down
12 changes: 12 additions & 0 deletions packages/babel-preset-gatsby-package/__tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ it(`Specifies proper presets and plugins in Node mode`, () => {
path.join(`@babel`, `plugin-proposal-optional-chaining`)
),
expect.stringContaining(path.join(`@babel`, `plugin-transform-runtime`)),
expect.stringContaining(
path.join(`@babel`, `plugin-syntax-dynamic-import`)
),
])
})

Expand Down Expand Up @@ -66,6 +69,9 @@ it(`Specifies proper presets and plugins in debug Node mode`, () => {
path.join(`@babel`, `plugin-proposal-optional-chaining`)
),
expect.stringContaining(path.join(`@babel`, `plugin-transform-runtime`)),
expect.stringContaining(
path.join(`@babel`, `plugin-syntax-dynamic-import`)
),
])
})

Expand Down Expand Up @@ -100,6 +106,9 @@ it(`Specifies proper presets and plugins in browser mode`, () => {
path.join(`@babel`, `plugin-proposal-optional-chaining`)
),
expect.stringContaining(path.join(`@babel`, `plugin-transform-runtime`)),
expect.stringContaining(
path.join(`@babel`, `plugin-syntax-dynamic-import`)
),
])
})

Expand Down Expand Up @@ -134,5 +143,8 @@ it(`Specifies proper presets and plugins in debug browser mode`, () => {
path.join(`@babel`, `plugin-proposal-optional-chaining`)
),
expect.stringContaining(path.join(`@babel`, `plugin-transform-runtime`)),
expect.stringContaining(
path.join(`@babel`, `plugin-syntax-dynamic-import`)
),
])
})
1 change: 1 addition & 0 deletions packages/babel-preset-gatsby-package/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ function preset(context, options = {}) {
r(`@babel/plugin-proposal-class-properties`),
r(`@babel/plugin-proposal-optional-chaining`),
r(`@babel/plugin-transform-runtime`),
r(`@babel/plugin-syntax-dynamic-import`),
],
}
}
Expand Down
3 changes: 2 additions & 1 deletion packages/babel-preset-gatsby-package/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "babel-preset-gatsby-package",
"version": "0.1.2",
"version": "0.1.3",
"author": "Philipp Spiess <[email protected]>",
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-flow": "^7.0.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/babel-preset-gatsby/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

<a name="0.1.5"></a>

## [0.1.5](https://github.com/gatsbyjs/gatsby/compare/[email protected]@0.1.5) (2018-11-29)

**Note:** Version bump only for package babel-preset-gatsby

<a name="0.1.4"></a>

## [0.1.4](https://github.com/gatsbyjs/gatsby/compare/[email protected]@0.1.4) (2018-11-15)
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-preset-gatsby/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-preset-gatsby",
"version": "0.1.4",
"version": "0.1.5",
"author": "Philipp Spiess <[email protected]>",
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.0.0",
Expand All @@ -18,6 +18,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"devDependencies": {
"babel-preset-gatsby-package": "^0.1.2"
"babel-preset-gatsby-package": "^0.1.3"
}
}
6 changes: 6 additions & 0 deletions packages/gatsby-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

<a name="2.4.6"></a>

## [2.4.6](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-cli/compare/[email protected]@2.4.6) (2018-11-29)

**Note:** Version bump only for package gatsby-cli

<a name="2.4.5"></a>

## [2.4.5](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-cli/compare/[email protected]@2.4.5) (2018-11-08)
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gatsby-cli",
"description": "Gatsby command-line interface for creating new sites and running Gatsby commands",
"version": "2.4.5",
"version": "2.4.6",
"author": "Kyle Mathews <[email protected]>",
"bin": {
"gatsby": "lib/index.js"
Expand Down Expand Up @@ -34,7 +34,7 @@
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"babel-preset-gatsby-package": "^0.1.2",
"babel-preset-gatsby-package": "^0.1.3",
"cross-env": "^5.1.4"
},
"files": [
Expand Down
6 changes: 6 additions & 0 deletions packages/gatsby-codemods/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

<a name="1.0.8"></a>

## [1.0.8](https://github.com/gatsbyjs/gatsby/compare/[email protected]@1.0.8) (2018-11-29)

**Note:** Version bump only for package gatsby-codemods

<a name="1.0.7"></a>

## [1.0.7](https://github.com/gatsbyjs/gatsby/compare/[email protected]@1.0.7) (2018-11-08)
Expand Down
Loading