Skip to content

Commit

Permalink
Reach 100 in lighthouse score
Browse files Browse the repository at this point in the history
  • Loading branch information
ixartz committed Jul 31, 2020
1 parent e422f06 commit a3372a6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/blog/BlogGallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ const BlogGallery = (props: IBlogGalleryProps) => (
{props.posts.map((elt) => (
<li key={elt.slug} className="mb-3 flex justify-between">
<Link href="/posts/[slug]" as={`/posts/${elt.slug}`}>
<a>{elt.title}</a>
<a>
<h2>{elt.title}</h2>
</a>
</Link>

<div>{format(new Date(elt.date), 'LLL d, yyyy')}</div>
Expand Down
6 changes: 1 addition & 5 deletions src/layout/Meta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ const Meta = (props: IMetaProps) => {
<>
<Head>
<meta charSet="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1"
key="viewport"
/>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" key="apple" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" key="icon32" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" key="icon16" />
Expand Down
21 changes: 21 additions & 0 deletions src/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';

import Document, {
Html, Head, Main, NextScript,
} from 'next/document';

class MyDocument extends Document {
render() {
return (
<Html lang="en">
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
);
}
}

export default MyDocument;
2 changes: 1 addition & 1 deletion src/pages/posts/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const DisplayPost = (props: IPostProps) => (
/>
)}
>
<div className="text-center font-bold text-3xl text-gray-900">{props.title}</div>
<h1 className="text-center font-bold text-3xl text-gray-900">{props.title}</h1>
<div className="text-center text-sm mb-8">{format(new Date(props.date), 'LLLL d, yyyy')}</div>
<div
// eslint-disable-next-line react/no-danger
Expand Down

0 comments on commit a3372a6

Please sign in to comment.