Merge pull request #114 from jumpalottahigh/make-v2-lighthouse-score-100
Make v2 lighthouse score 100
This commit is contained in:
commit
8a15321b26
7 changed files with 5431 additions and 7625 deletions
|
|
@ -45,6 +45,18 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
`gatsby-plugin-feed`,
|
`gatsby-plugin-feed`,
|
||||||
|
{
|
||||||
|
resolve: `gatsby-plugin-manifest`,
|
||||||
|
options: {
|
||||||
|
name: `Gatsby Starter Blog`,
|
||||||
|
short_name: `GatsbyJS`,
|
||||||
|
start_url: `/`,
|
||||||
|
background_color: `#ffffff`,
|
||||||
|
theme_color: `#663399`,
|
||||||
|
display: `minimal-ui`,
|
||||||
|
icon: `src/assets/gatsby-icon.png`,
|
||||||
|
},
|
||||||
|
},
|
||||||
`gatsby-plugin-offline`,
|
`gatsby-plugin-offline`,
|
||||||
`gatsby-plugin-react-helmet`,
|
`gatsby-plugin-react-helmet`,
|
||||||
{
|
{
|
||||||
|
|
|
||||||
13024
package-lock.json
generated
13024
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -10,6 +10,7 @@
|
||||||
"gatsby": "next",
|
"gatsby": "next",
|
||||||
"gatsby-plugin-feed": "next",
|
"gatsby-plugin-feed": "next",
|
||||||
"gatsby-plugin-google-analytics": "next",
|
"gatsby-plugin-google-analytics": "next",
|
||||||
|
"gatsby-plugin-manifest": "next",
|
||||||
"gatsby-plugin-offline": "next",
|
"gatsby-plugin-offline": "next",
|
||||||
"gatsby-plugin-react-helmet": "next",
|
"gatsby-plugin-react-helmet": "next",
|
||||||
"gatsby-plugin-sharp": "next",
|
"gatsby-plugin-sharp": "next",
|
||||||
|
|
|
||||||
BIN
src/assets/gatsby-icon.png
Normal file
BIN
src/assets/gatsby-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 3.3 KiB |
|
|
@ -10,11 +10,19 @@ import { rhythm } from '../utils/typography'
|
||||||
class BlogIndex extends React.Component {
|
class BlogIndex extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
const siteTitle = get(this, 'props.data.site.siteMetadata.title')
|
const siteTitle = get(this, 'props.data.site.siteMetadata.title')
|
||||||
|
const siteDescription = get(
|
||||||
|
this,
|
||||||
|
'props.data.site.siteMetadata.description'
|
||||||
|
)
|
||||||
const posts = get(this, 'props.data.allMarkdownRemark.edges')
|
const posts = get(this, 'props.data.allMarkdownRemark.edges')
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout location={this.props.location}>
|
<Layout location={this.props.location}>
|
||||||
<Helmet title={siteTitle} />
|
<Helmet
|
||||||
|
htmlAttributes={{ lang: 'en' }}
|
||||||
|
meta={[{ name: 'description', content: siteDescription }]}
|
||||||
|
title={siteTitle}
|
||||||
|
/>
|
||||||
<Bio />
|
<Bio />
|
||||||
{posts.map(({ node }) => {
|
{posts.map(({ node }) => {
|
||||||
const title = get(node, 'frontmatter.title') || node.fields.slug
|
const title = get(node, 'frontmatter.title') || node.fields.slug
|
||||||
|
|
@ -46,6 +54,7 @@ export const pageQuery = graphql`
|
||||||
site {
|
site {
|
||||||
siteMetadata {
|
siteMetadata {
|
||||||
title
|
title
|
||||||
|
description
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
allMarkdownRemark(sort: { fields: [frontmatter___date], order: DESC }) {
|
allMarkdownRemark(sort: { fields: [frontmatter___date], order: DESC }) {
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,16 @@ class BlogPostTemplate extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
const post = this.props.data.markdownRemark
|
const post = this.props.data.markdownRemark
|
||||||
const siteTitle = get(this.props, 'data.site.siteMetadata.title')
|
const siteTitle = get(this.props, 'data.site.siteMetadata.title')
|
||||||
|
const siteDescription = post.excerpt
|
||||||
const { previous, next } = this.props.pageContext
|
const { previous, next } = this.props.pageContext
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout location={this.props.location}>
|
<Layout location={this.props.location}>
|
||||||
<Helmet title={`${post.frontmatter.title} | ${siteTitle}`} />
|
<Helmet
|
||||||
|
htmlAttributes={{ lang: 'en' }}
|
||||||
|
meta={[{ name: 'description', content: siteDescription }]}
|
||||||
|
title={`${post.frontmatter.title} | ${siteTitle}`}
|
||||||
|
/>
|
||||||
<h1>{post.frontmatter.title}</h1>
|
<h1>{post.frontmatter.title}</h1>
|
||||||
<p
|
<p
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -77,6 +82,7 @@ export const pageQuery = graphql`
|
||||||
}
|
}
|
||||||
markdownRemark(fields: { slug: { eq: $slug } }) {
|
markdownRemark(fields: { slug: { eq: $slug } }) {
|
||||||
id
|
id
|
||||||
|
excerpt
|
||||||
html
|
html
|
||||||
frontmatter {
|
frontmatter {
|
||||||
title
|
title
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue