Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Heilemann committed Sep 29, 2019
1 parent bee7024 commit c29d3d3
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 109 deletions.
7 changes: 4 additions & 3 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@
- [ ] add md table of contents
- [x] test purgecss with classes from Markdown files
- [ ] add NOW deployment
- [ ] Setup Nameserver
- [x] Setup Nameserver
- [ ] Test
- [ ] Everything pushed to master -> marvin.digital
- [ ] Everything pushed to development -> dev.marvin.digital
- [ ] Everything pushed to by hand -> dev.marvin.digital
- [ ] ~~replace React with [Preact][1]~~
- [ ] test react helmet async
- [x] test react helmet async
- [x] add "increase version" by script
- [x] add bundle analyzer
- [x] analyze via bundlephobia
- [ ] add github bots to auto update dependencies
- [x] add github bots to auto update dependencies
- [x] add lighthouse from M8FINDER project
- [ ] add League of Legends API to show profile and stats
- [ ] add classes to tags https://github.com/gatsbyjs/gatsby/issues/17824
Expand Down
5 changes: 3 additions & 2 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ module.exports = {
'gatsby-plugin-layout',
`gatsby-plugin-react-helmet`,
{
resolve: 'gatsby-plugin-react-helmet-canonical-urls',
resolve: `gatsby-plugin-canonical-urls`,
options: {
siteUrl: process.env.GATSBY_SITE_URL,
siteUrl: process.env.SITE_URL,
stripQueryString: true,
},
},
`gatsby-plugin-sass`,
Expand Down
51 changes: 18 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
"dotenv": "^8.1.0",
"gatsby": "^2.15.28",
"gatsby-image": "^2.2.23",
"gatsby-plugin-canonical-urls": "^2.1.10",
"gatsby-plugin-catch-links": "^2.1.12",
"gatsby-plugin-humans-txt": "^1.1.4",
"gatsby-plugin-layout": "^1.1.10",
"gatsby-plugin-manifest": "^2.2.20",
"gatsby-plugin-postcss": "^2.1.10",
"gatsby-plugin-purgecss": "^4.0.1",
"gatsby-plugin-react-helmet": "^3.1.10",
"gatsby-plugin-react-helmet-canonical-urls": "^1.2.0",
"gatsby-plugin-robots-txt": "^1.5.0",
"gatsby-plugin-sass": "^2.1.17",
"gatsby-plugin-sharp": "^2.2.27",
Expand All @@ -69,7 +69,6 @@
"prop-types": "^15.7.2",
"react": "^16.10.1",
"react-dom": "^16.10.1",
"react-helmet": "^5.2.1",
"react-helmet-async": "^1.0.3"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions reports/v3.0.0/treemap.html

Large diffs are not rendered by default.

86 changes: 29 additions & 57 deletions src/components/SEO.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import Helmet from 'react-helmet'
import { Helmet } from 'react-helmet-async'
import { StaticQuery, graphql } from 'gatsby'

const SEO = ({
Expand All @@ -17,6 +17,8 @@ const SEO = ({
render={data => {
const metaDescription = description || data.site.siteMetadata.description

console.log(data)

// set default social-media images
if (!ogImage) {
ogImage = `${data.site.siteMetadata.siteUrl}/og-image.jpg`
Expand All @@ -33,62 +35,32 @@ const SEO = ({
title={title}
defaultTitle={data.site.siteMetadata.title}
titleTemplate={`%s | ${data.site.siteMetadata.title}`}
meta={[
{
name: 'language',
content: lang,
},
{
name: 'description',
content: metaDescription,
},
{
property: 'og:title',
content: title,
},
{
property: 'og:description',
content: metaDescription,
},
{
property: 'og:type',
content: 'website',
},
{
property: 'og:image',
content: ogImage,
},
{
name: 'twitter:card',
content: 'summary_large_image',
},
{
name: 'twitter:creator',
content: `@${data.site.siteMetadata.author}`,
},
{
name: 'twitter:title',
content: title,
},
{
name: 'twitter:description',
content: metaDescription,
},
{
name: 'twitter:image',
content: twitterCard,
},
]
.concat(
keywords && keywords.length > 0
? {
name: 'keywords',
content: keywords.join(', '),
}
: []
)
.concat(meta)}
/>
meta={meta.concat(
keywords && keywords.length > 0
? {
name: 'keywords',
content: keywords.join(', '),
}
: []
)}
>
<meta name="language" content={lang} />
<meta name="description" content={metaDescription} />

<meta name="og:title" content={title} />
<meta name="og:description" content={metaDescription} />
<meta name="og:type" content="website" />
<meta name="og:image" content={ogImage} />

<meta name="twitter:card" content="summary_large_image" />
<meta
name="twitter:creator"
content={`@${data.site.siteMetadata.author}`}
/>
<meta name="twitter:title" content={title} />
<meta name="twitter:description" content={metaDescription} />
<meta name="twitter:image" content={twitterCard} />
</Helmet>
)
}}
/>
Expand Down
5 changes: 1 addition & 4 deletions src/layouts/index.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import React from 'react'
import { ContextProviderComponent } from '../context'
import { Helmet, HelmetProvider } from 'react-helmet-async'
import { HelmetProvider } from 'react-helmet-async'

import Header from './Header'

const Layout = ({ children }) => (
<ContextProviderComponent>
<HelmetProvider>
<Helmet>
<meta name="name" content="content" />
</Helmet>
<Header></Header>
<main>{children}</main>
</HelmetProvider>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/404.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import Helmet from 'react-helmet'
import { Helmet } from 'react-helmet-async'
import { ContextConsumer } from '../context'
import SEO from '../components/SEO'

Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import Helmet from 'react-helmet'
import { Helmet } from 'react-helmet-async'
import { useStaticQuery, graphql } from 'gatsby'
import { Link } from 'gatsby'
import { ContextConsumer } from '../context'
Expand Down
2 changes: 1 addition & 1 deletion src/pages/projects.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { useStaticQuery, graphql } from 'gatsby'
import Helmet from 'react-helmet'
import { Helmet } from 'react-helmet-async'
import { ContextConsumer } from '../context'
import SEO from '../components/SEO'

Expand Down
2 changes: 1 addition & 1 deletion src/pages/writings.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { useStaticQuery, graphql, Link } from 'gatsby'
import Helmet from 'react-helmet'
import { Helmet } from 'react-helmet-async'
import { ContextConsumer } from '../context'
import SEO from '../components/SEO'
import { isDev } from '../environment'
Expand Down
2 changes: 1 addition & 1 deletion src/templates/ProjectsSingle.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { graphql } from 'gatsby'
import React from 'react'
import Helmet from 'react-helmet'
import { Helmet } from 'react-helmet-async'

import HeroProjects from '../components/HeroProjects'
import SEO from '../components/SEO'
Expand Down
2 changes: 1 addition & 1 deletion src/templates/WritingsSingle.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { graphql } from 'gatsby'
import React from 'react'
import Helmet from 'react-helmet'
import { Helmet } from 'react-helmet-async'

import SEO from '../components/SEO'
import { isDev } from '../environment'
Expand Down

1 comment on commit c29d3d3

@vercel
Copy link

@vercel vercel bot commented on c29d3d3 Sep 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment failed with the following error:

The domain marvin.digital is not verfied and cannot be used as an alias

Please sign in to comment.