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`,
|
||||
{
|
||||
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-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-plugin-feed": "next",
|
||||
"gatsby-plugin-google-analytics": "next",
|
||||
"gatsby-plugin-manifest": "next",
|
||||
"gatsby-plugin-offline": "next",
|
||||
"gatsby-plugin-react-helmet": "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 {
|
||||
render() {
|
||||
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')
|
||||
|
||||
return (
|
||||
<Layout location={this.props.location}>
|
||||
<Helmet title={siteTitle} />
|
||||
<Helmet
|
||||
htmlAttributes={{ lang: 'en' }}
|
||||
meta={[{ name: 'description', content: siteDescription }]}
|
||||
title={siteTitle}
|
||||
/>
|
||||
<Bio />
|
||||
{posts.map(({ node }) => {
|
||||
const title = get(node, 'frontmatter.title') || node.fields.slug
|
||||
|
|
@ -46,6 +54,7 @@ export const pageQuery = graphql`
|
|||
site {
|
||||
siteMetadata {
|
||||
title
|
||||
description
|
||||
}
|
||||
}
|
||||
allMarkdownRemark(sort: { fields: [frontmatter___date], order: DESC }) {
|
||||
|
|
|
|||
|
|
@ -11,11 +11,16 @@ class BlogPostTemplate extends React.Component {
|
|||
render() {
|
||||
const post = this.props.data.markdownRemark
|
||||
const siteTitle = get(this.props, 'data.site.siteMetadata.title')
|
||||
const siteDescription = post.excerpt
|
||||
const { previous, next } = this.props.pageContext
|
||||
|
||||
return (
|
||||
<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>
|
||||
<p
|
||||
style={{
|
||||
|
|
@ -77,6 +82,7 @@ export const pageQuery = graphql`
|
|||
}
|
||||
markdownRemark(fields: { slug: { eq: $slug } }) {
|
||||
id
|
||||
excerpt
|
||||
html
|
||||
frontmatter {
|
||||
title
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue