Skip to content

Commit

Permalink
sync with upstream (#1)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency netlify-cms-app to v2.11.18

* fix: use getAsset in preview templates (decaporg#496)

* fix(deps): update dependency netlify-cms-app to v2.11.19

* Fix readme typo

* chore(deps): lock file maintenance

* chore(deps): lock file maintenance

* fix(deps): update dependency netlify-cms-app to v2.11.20

* fix(deps): update dependency netlify-cms-app to v2.11.21

* fix(deps): update dependency netlify-cms-app to v2.11.22

* fix(deps): update dependency netlify-cms-app to v2.11.23

* fix(deps): update dependency gatsby-remark-relative-images to ^0.3.0

* chore(deps): lock file maintenance

* fix(deps): update dependency netlify-cms-app to v2.11.24

* fix(deps): update dependency netlify-cms-app to v2.11.25

* fix(deps): update dependency netlify-cms-app to v2.11.26

* fix(deps): update gatsby monorepo

* chore(deps): lock file maintenance

* fix(deps): update dependency netlify-cms-app to v2.11.27

* fix(deps): update gatsby monorepo

* fix(deps): update gatsby monorepo

* fix(deps): update dependency netlify-cms-app to v2.11.32

* fix(deps): update react monorepo to v16.13.1

* fix(deps): update dependency bulma to v0.8.1

* fix(deps): update dependency netlify-cms-app to v2.12.0

* fix(deps): update dependency netlify-cms-app to v2.12.1

* fix(deps): update dependency netlify-cms-app to v2.12.2

* fix(deps): update dependency netlify-cms-app to v2.12.3

* fix(deps): update dependency uuid to v7 (decaporg#515)

Co-authored-by: Renovate Bot <[email protected]>

* fix(deps): update dependency netlify-cms-app to v2.12.4

* fix(deps): update dependency netlify-cms-app to v2.12.5

* fix(deps): update dependency netlify-cms-app to v2.12.6

* fix(deps): update dependency netlify-cms-app to v2.12.7

* fix(deps): update dependency bulma to v0.8.2

* fix(deps): update dependency netlify-cms-app to v2.12.8

* fix(deps): update dependency netlify-cms-app to v2.12.9

* fix(deps): update dependency netlify-cms-app to v2.12.10

* fix(deps): update dependency netlify-cms-app to v2.12.11

* Fix _headers syntax (decaporg#546)

TOML content in a _headers file is not allowed and is ignore by production.

* ci(Netlify): update yarn and node versions to fix build failure (decaporg#552)

* ci: update yarn & node versions

* chore(deps): update all dependencies

* chore(deps): update lock file

* fix(deps): update gatsby monorepo

* fix(deps): update gatsby monorepo

* chore(deps): lock file maintenance

* chore(deps): lock file maintenance

* chore(deps): lock file maintenance

* fix(deps): update dependency netlify-cms-app to v2.12.12

* fix(deps): update dependency node-sass to v4.14.1

* fix(deps): update gatsby monorepo

* fix(deps): update gatsby monorepo

* fix(deps): update dependency netlify-cms-app to v2.12.13

* Make footer max width 100vw to fix lighthouse test error (decaporg#574)

* restrict footer width to 100vw

* make it camel case

* fix(deps): update gatsby monorepo

* fix(deps): update dependency gatsby to v2.22.15

* fix(deps): update dependency netlify-cms-app to v2.12.14

* chore(deps): [security] bump websocket-extensions from 0.1.3 to 0.1.4

Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4. **This update includes a security fix.**
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](faye/websocket-extensions-node@0.1.3...0.1.4)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* fix(deps): update dependency bulma to ^0.9.0

* chore(deps): lock file maintenance

* chore(deps): lock file maintenance

* fix(deps): update dependency react-helmet to v6.1.0

* Update link to JavaScript Lambda functions docs (decaporg#585)

* fix(deps): update dependency netlify-cms-app to v2.12.15

* fix(deps): update gatsby monorepo

* chore(deps): lock file maintenance

* fix(deps): update dependency gatsby to v2.23.7

* chore(deps): lock file maintenance

* fix(deps): update gatsby monorepo

* chore(deps): lock file maintenance

* fix(deps): update dependency netlify-cms-app to v2.12.16

* fix(deps): update gatsby monorepo

* chore(deps): lock file maintenance

* Typo fix in readme (decaporg#596)

Thanks!

* chore(deps): lock file maintenance

* fix(deps): update dependency netlify-cms-app to v2.12.17

* fix(deps): update dependency netlify-cms-app to v2.12.18

* chore(deps): lock file maintenance

* chore(deps): lock file maintenance

* fix(deps): update gatsby monorepo

* fix(deps): update dependency netlify-cms-media-library-cloudinary to v1.3.5

* fix(deps): update dependency netlify-cms-app to v2.12.19

* fix(deps): update dependency netlify-cms-media-library-uploadcare to v0.5.6

* fix(deps): update gatsby monorepo

* fix(deps): update gatsby monorepo

* fix(deps): update dependency netlify-cms-media-library-cloudinary to v1.3.6

* fix(deps): update dependency netlify-cms-media-library-uploadcare to v0.5.7

* chore(deps): update dependency prettier to v2.1.1

* fix(deps): update dependency netlify-cms-media-library-cloudinary to v1.3.7

* fix(deps): update dependency netlify-cms-media-library-uploadcare to v0.5.8

* fix(deps): update dependency netlify-cms-media-library-cloudinary to v1.3.8

* fix(deps): update dependency netlify-cms-media-library-uploadcare to v0.5.9

* chore(deps): update dependency prettier to v2.1.2

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Erez Rokah <[email protected]>
Co-authored-by: Kevin Borrill <[email protected]>
Co-authored-by: Zoli Veres <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Raees Iqbal <[email protected]>
Co-authored-by: Bilal <[email protected]>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Adriana Babakanian <[email protected]>
Co-authored-by: Charlie Bevis <[email protected]>
  • Loading branch information
11 people authored Oct 2, 2020
1 parent b41e130 commit c075ca3
Show file tree
Hide file tree
Showing 18 changed files with 5,050 additions and 3,503 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ It follows the [JAMstack architecture](https://jamstack.org) by using Git as a s
## Features

- A simple landing page with blog functionality built with Netlify CMS
- Editabe Pages: Landing, About, Product, Blog-Collection and Contact page with Netlify Form support
- Editable Pages: Landing, About, Product, Blog-Collection and Contact page with Netlify Form support
- Create Blog posts from Netlify CMS
- Tags: Separate page for posts under each tag
- Basic directory organization
Expand Down Expand Up @@ -50,7 +50,7 @@ $ netlify dev # or ntl dev

This uses the new [Netlify Dev](https://www.netlify.com/products/dev/?utm_source=blog&utm_medium=netlifycms&utm_campaign=devex) CLI feature to serve any functions you have in the `lambda` folder.

To test the CMS locally, you'll need run a production build of the site:
To test the CMS locally, you'll need to run a production build of the site:

```
$ npm run build
Expand Down
6 changes: 2 additions & 4 deletions _headers
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
[[headers]]
for = "/static/*"
[headers.values]
Cache-Control = "public, max-age=360000"
/static/*
Cache-Control: "public, max-age=360000"
10 changes: 5 additions & 5 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ exports.createPages = ({ actions, graphql }) => {
}
}
}
`).then(result => {
`).then((result) => {
if (result.errors) {
result.errors.forEach(e => console.error(e.toString()))
result.errors.forEach((e) => console.error(e.toString()))
return Promise.reject(result.errors)
}

const posts = result.data.allMarkdownRemark.edges

posts.forEach(edge => {
posts.forEach((edge) => {
const id = edge.node.id
createPage({
path: edge.node.fields.slug,
Expand All @@ -49,7 +49,7 @@ exports.createPages = ({ actions, graphql }) => {
// Tag pages:
let tags = []
// Iterate through each post, putting all found tags into `tags`
posts.forEach(edge => {
posts.forEach((edge) => {
if (_.get(edge, `node.frontmatter.tags`)) {
tags = tags.concat(edge.node.frontmatter.tags)
}
Expand All @@ -58,7 +58,7 @@ exports.createPages = ({ actions, graphql }) => {
tags = _.uniq(tags)

// Make tag pages
tags.forEach(tag => {
tags.forEach((tag) => {
const tagPath = `/tags/${_.kebabCase(tag)}/`

createPage({
Expand Down
2 changes: 1 addition & 1 deletion lambda/hello.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// For more info, check https://www.netlify.com/docs/functions/#javascript-lambda-functions
// For more info, check https://docs.netlify.com/functions/build-with-javascript
module.exports.handler = async function(event, context) {
console.log("queryStringParameters", event.queryStringParameters)
return {
Expand Down
3 changes: 2 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
command = "npm run build"
functions = "lambda"
[build.environment]
YARN_VERSION = "1.9.4"
NODE_VERSION = "12"
YARN_VERSION = "1.22.4"
YARN_FLAGS = "--no-ignore-optional"
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@
"version": "1.1.3",
"author": "Austin Green",
"dependencies": {
"bulma": "^0.8.0",
"gatsby": "^2.13.31",
"gatsby-image": "^2.0.23",
"gatsby-plugin-netlify": "^2.0.6",
"gatsby-plugin-netlify-cms": "^4.1.6",
"gatsby-plugin-purgecss": "^4.0.0",
"gatsby-plugin-react-helmet": "^3.0.4",
"gatsby-plugin-sass": "^2.0.7",
"gatsby-plugin-sharp": "^2.2.9",
"gatsby-remark-copy-linked-files": "^2.0.7",
"gatsby-remark-images": "^3.1.6",
"gatsby-remark-relative-images": "^0.2.1",
"gatsby-source-filesystem": "^2.0.26",
"gatsby-transformer-remark": "^2.6.9",
"gatsby-transformer-sharp": "^2.1.9",
"bulma": "^0.9.0",
"gatsby": "^2.20.35",
"gatsby-image": "^2.3.5",
"gatsby-plugin-netlify": "^2.2.4",
"gatsby-plugin-netlify-cms": "^4.2.5",
"gatsby-plugin-purgecss": "^5.0.0",
"gatsby-plugin-react-helmet": "^3.2.5",
"gatsby-plugin-sass": "^2.2.4",
"gatsby-plugin-sharp": "^2.5.7",
"gatsby-remark-copy-linked-files": "^2.2.4",
"gatsby-remark-images": "^3.2.6",
"gatsby-remark-relative-images": "^0.3.0",
"gatsby-source-filesystem": "^2.2.5",
"gatsby-transformer-remark": "^2.7.5",
"gatsby-transformer-sharp": "^2.4.7",
"lodash": "^4.17.15",
"lodash-webpack-plugin": "^0.11.4",
"netlify-cms-app": "^2.9.6",
"netlify-cms-media-library-cloudinary": "^1.3.2",
"netlify-cms-media-library-uploadcare": "^0.5.2",
"node-sass": "^4.11.0",
"node-sass": "^4.14.0",
"prop-types": "^15.6.0",
"react": "^16.8.4",
"react-dom": "^16.8.4",
"react-helmet": "^5.2.0",
"uuid": "^3.2.1"
"react-helmet": "^6.0.0",
"uuid": "^7.0.0"
},
"keywords": [
"gatsby"
Expand All @@ -45,6 +45,6 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"prettier": "^1.15.3"
"prettier": "^2.0.5"
}
}
2 changes: 1 addition & 1 deletion src/cms/preview-templates/IndexPagePreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const IndexPagePreview = ({ entry, getAsset }) => {
if (data) {
return (
<IndexPageTemplate
image={data.image}
image={getAsset(data.image)}
title={data.title}
heading={data.heading}
subheading={data.subheading}
Expand Down
2 changes: 1 addition & 1 deletion src/cms/preview-templates/ProductPagePreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const ProductPagePreview = ({ entry, getAsset }) => {

return (
<ProductPageTemplate
image={entry.getIn(['data', 'image'])}
image={getAsset(entry.getIn(['data', 'image']))}
title={entry.getIn(['data', 'title'])}
heading={entry.getIn(['data', 'heading'])}
description={entry.getIn(['data', 'description'])}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Features.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PreviewCompatibleImage from '../components/PreviewCompatibleImage'

const FeatureGrid = ({ gridItems }) => (
<div className="columns is-multiline">
{gridItems.map(item => (
{gridItems.map((item) => (
<div key={item.text} className="column is-6">
<section className="section">
<div className="has-text-centered">
Expand Down
2 changes: 1 addition & 1 deletion src/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Footer = class extends React.Component {
</div>
<div className="content has-text-centered has-background-black has-text-white-ter">
<div className="container has-background-black has-text-white-ter">
<div className="columns">
<div style={{ maxWidth: '100vw' }} className="columns">
<div className="column is-4">
<section className="menu">
<ul className="menu-list">
Expand Down
4 changes: 2 additions & 2 deletions src/components/Pricing.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'

const Pricing = ({ data }) => (
<div className="columns">
{data.map(price => (
{data.map((price) => (
<div key={price.plan} className="column">
<section className="section">
<h4 className="has-text-centered has-text-weight-semibold">
Expand All @@ -14,7 +14,7 @@ const Pricing = ({ data }) => (
</h2>
<p className="has-text-weight-semibold">{price.description}</p>
<ul>
{price.items.map(item => (
{price.items.map((item) => (
<li key={item} className="is-size-5">
{item}
</li>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Testimonials.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { v4 } from 'uuid'

const Testimonials = ({ testimonials }) => (
<div>
{testimonials.map(testimonial => (
{testimonials.map((testimonial) => (
<article key={v4()} className="message">
<div className="message-body">
{testimonial.quote}
Expand Down
8 changes: 4 additions & 4 deletions src/pages/contact/file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ export default class Contact extends React.Component {
this.state = {}
}

handleChange = e => {
handleChange = (e) => {
this.setState({ [e.target.name]: e.target.value })
}

handleAttachment = e => {
handleAttachment = (e) => {
this.setState({ [e.target.name]: e.target.files[0] })
}

handleSubmit = e => {
handleSubmit = (e) => {
e.preventDefault()
const form = e.target
fetch('/', {
Expand All @@ -37,7 +37,7 @@ export default class Contact extends React.Component {
}),
})
.then(() => navigate(form.getAttribute('action')))
.catch(error => alert(error))
.catch((error) => alert(error))
}

render() {
Expand Down
8 changes: 4 additions & 4 deletions src/pages/contact/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Layout from '../../components/Layout'

function encode(data) {
return Object.keys(data)
.map(key => encodeURIComponent(key) + '=' + encodeURIComponent(data[key]))
.map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(data[key]))
.join('&')
}

Expand All @@ -14,11 +14,11 @@ export default class Index extends React.Component {
this.state = { isValidated: false }
}

handleChange = e => {
handleChange = (e) => {
this.setState({ [e.target.name]: e.target.value })
}

handleSubmit = e => {
handleSubmit = (e) => {
e.preventDefault()
const form = e.target
fetch('/', {
Expand All @@ -30,7 +30,7 @@ export default class Index extends React.Component {
}),
})
.then(() => navigate(form.getAttribute('action')))
.catch(error => alert(error))
.catch((error) => alert(error))
}

render() {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/tags/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { kebabCase } from 'lodash'
import Helmet from 'react-helmet'
import { Helmet } from 'react-helmet'
import { Link, graphql } from 'gatsby'
import Layout from '../../components/Layout'

Expand All @@ -23,7 +23,7 @@ const TagsPage = ({
>
<h1 className="title is-size-2 is-bold-light">Tags</h1>
<ul className="taglist">
{group.map(tag => (
{group.map((tag) => (
<li key={tag.fieldValue}>
<Link to={`/tags/${kebabCase(tag.fieldValue)}/`}>
{tag.fieldValue} ({tag.totalCount})
Expand Down
4 changes: 2 additions & 2 deletions src/templates/blog-post.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import { kebabCase } from 'lodash'
import Helmet from 'react-helmet'
import { Helmet } from 'react-helmet'
import { graphql, Link } from 'gatsby'
import Layout from '../components/Layout'
import Content, { HTMLContent } from '../components/Content'
Expand Down Expand Up @@ -31,7 +31,7 @@ export const BlogPostTemplate = ({
<div style={{ marginTop: `4rem` }}>
<h4>Tags</h4>
<ul className="taglist">
{tags.map(tag => (
{tags.map((tag) => (
<li key={tag + `tag`}>
<Link to={`/tags/${kebabCase(tag)}/`}>{tag}</Link>
</li>
Expand Down
4 changes: 2 additions & 2 deletions src/templates/tags.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react'
import Helmet from 'react-helmet'
import { Helmet } from 'react-helmet'
import { Link, graphql } from 'gatsby'
import Layout from '../components/Layout'

class TagRoute extends React.Component {
render() {
const posts = this.props.data.allMarkdownRemark.edges
const postLinks = posts.map(post => (
const postLinks = posts.map((post) => (
<li key={post.node.fields.slug}>
<Link to={post.node.fields.slug}>
<h2 className="is-size-2">{post.node.frontmatter.title}</h2>
Expand Down
Loading

0 comments on commit c075ca3

Please sign in to comment.