chore: tidy up some code

This commit is contained in:
Timothy Lin 2023-07-16 23:42:48 +08:00
parent f063d4d8b0
commit 9b9355baed
4 changed files with 29 additions and 38 deletions

View File

@ -1,5 +1,4 @@
import Link from '@/components/Link'
// import { PageSEO } from '@/components/SEO'
import Tag from '@/components/Tag'
import siteMetadata from '@/data/siteMetadata'
import { formatDate } from 'pliny/utils/formatDate'
@ -10,7 +9,6 @@ const MAX_DISPLAY = 5
export default function Home({ posts }) {
return (
<>
{/* <PageSEO title={siteMetadata.title} description={siteMetadata.description} /> */}
<div className="divide-y divide-gray-200 dark:divide-gray-700">
<div className="space-y-2 pb-8 pt-6 md:space-y-5">
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">

View File

@ -1,31 +1,25 @@
import Link from '@/components/Link'
// import { PageSEO } from '@/components/SEO'
export default function NotFound() {
return (
<>
{/* <PageSEO title="Page Not Found" description="Sorry we couldn't find this page :(" /> */}
<div className="flex flex-col items-start justify-start md:mt-24 md:flex-row md:items-center md:justify-center md:space-x-6">
<div className="space-x-2 pb-8 pt-6 md:space-y-5">
<h1 className="text-6xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 md:border-r-2 md:px-6 md:text-8xl md:leading-14">
404
</h1>
</div>
<div className="max-w-md">
<p className="mb-4 text-xl font-bold leading-normal md:text-2xl">
Sorry we couldn't find this page.
</p>
<p className="mb-8">
But dont worry, you can find plenty of other things on our homepage.
</p>
<Link
href="/"
className="focus:shadow-outline-blue inline rounded-lg border border-transparent bg-blue-600 px-4 py-2 text-sm font-medium leading-5 text-white shadow transition-colors duration-150 hover:bg-blue-700 focus:outline-none dark:hover:bg-blue-500"
>
Back to homepage
</Link>
</div>
<div className="flex flex-col items-start justify-start md:mt-24 md:flex-row md:items-center md:justify-center md:space-x-6">
<div className="space-x-2 pb-8 pt-6 md:space-y-5">
<h1 className="text-6xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 md:border-r-2 md:px-6 md:text-8xl md:leading-14">
404
</h1>
</div>
</>
<div className="max-w-md">
<p className="mb-4 text-xl font-bold leading-normal md:text-2xl">
Sorry we couldn't find this page.
</p>
<p className="mb-8">But dont worry, you can find plenty of other things on our homepage.</p>
<Link
href="/"
className="focus:shadow-outline-blue inline rounded-lg border border-transparent bg-blue-600 px-4 py-2 text-sm font-medium leading-5 text-white shadow transition-colors duration-150 hover:bg-blue-700 focus:outline-none dark:hover:bg-blue-500"
>
Back to homepage
</Link>
</div>
</div>
)
}

View File

@ -66,18 +66,18 @@ const siteMetadata = {
},
},
search: {
// provider: 'kbar', // kbar or algolia
// kbarConfig: {
// searchDocumentsPath: 'search.json', // path to load documents to search
// },
provider: 'algolia',
algoliaConfig: {
// The application ID provided by Algolia
appId: 'R2IYF7ETH7',
// Public API key: it is safe to commit it
apiKey: '599cec31baffa4868cae4e79f180729b',
indexName: 'docsearch',
provider: 'kbar', // kbar or algolia
kbarConfig: {
searchDocumentsPath: 'search.json', // path to load documents to search
},
// provider: 'algolia',
// algoliaConfig: {
// // The application ID provided by Algolia
// appId: 'R2IYF7ETH7',
// // Public API key: it is safe to commit it
// apiKey: '599cec31baffa4868cae4e79f180729b',
// indexName: 'docsearch',
// },
},
}

View File

@ -5,7 +5,6 @@ import Comments from '@/components/Comments'
import Link from '@/components/Link'
import PageTitle from '@/components/PageTitle'
import SectionContainer from '@/components/SectionContainer'
// import { BlogSEO } from '@/components/SEO'
import Image from '@/components/Image'
import Tag from '@/components/Tag'
import siteMetadata from '@/data/siteMetadata'