From ca3b074d29178eae5850496f5609b973301951bc Mon Sep 17 00:00:00 2001 From: Georgi Yanev Date: Sat, 21 Jul 2018 10:57:37 +0300 Subject: [PATCH] Make accesibility score 100 in Lighthouse While we could fetch the lang attribute data from the gatsby config file, it's probably better to couple those with the particular page's Helmet as if we have a different language (i18n) we would need to be able to define that too. --- src/pages/index.js | 2 +- src/templates/blog-post.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/index.js b/src/pages/index.js index 2bd5a77..3657232 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -14,7 +14,7 @@ class BlogIndex extends React.Component { return ( - + {posts.map(({ node }) => { const title = get(node, 'frontmatter.title') || node.fields.slug diff --git a/src/templates/blog-post.js b/src/templates/blog-post.js index 8dfb68c..9e54c49 100644 --- a/src/templates/blog-post.js +++ b/src/templates/blog-post.js @@ -15,7 +15,10 @@ class BlogPostTemplate extends React.Component { return ( - +

{post.frontmatter.title}