Merge branch 'main' into main
This commit is contained in:
		| @@ -35,6 +35,7 @@ Looking for a Remix-run alternative? Check out the unofficial [Tailwind Remix-ru | |||||||
| - [enscribe.dev](https://enscribe.dev) - enscribe's personal blog; cybersecurity shenanigans, frontend webdev, etc. ([source code](https://github.com/jktrn/enscribe.dev)) | - [enscribe.dev](https://enscribe.dev) - enscribe's personal blog; cybersecurity shenanigans, frontend webdev, etc. ([source code](https://github.com/jktrn/enscribe.dev)) | ||||||
| - [dalelarroder.com](https://dalelarroder.com) - Dale Larroder's personal website upgraded from V1 ([source code](https://github.com/dlarroder/dalelarroder)) | - [dalelarroder.com](https://dalelarroder.com) - Dale Larroder's personal website upgraded from V1 ([source code](https://github.com/dlarroder/dalelarroder)) | ||||||
| - [thetalhatahir.com](https://www.thetalhatahir.com)  - Talha Tahir's personal blog. Added article thumbnails, linkedIn card, Beautiful hero content, technology emoticons. | - [thetalhatahir.com](https://www.thetalhatahir.com)  - Talha Tahir's personal blog. Added article thumbnails, linkedIn card, Beautiful hero content, technology emoticons. | ||||||
|  | - [hauhau.cn](https://www.hauhau.cn) - Homing's personal blog about the stuff he's learning ([source code](https://github.com/hominsu/blog)) | ||||||
|  |  | ||||||
|    |    | ||||||
| Using the template? Feel free to create a PR and add your blog to this list. | Using the template? Feel free to create a PR and add your blog to this list. | ||||||
|   | |||||||
| @@ -12,6 +12,7 @@ import PostLayout from '@/layouts/PostLayout' | |||||||
| import PostBanner from '@/layouts/PostBanner' | import PostBanner from '@/layouts/PostBanner' | ||||||
| import { Metadata } from 'next' | import { Metadata } from 'next' | ||||||
| import siteMetadata from '@/data/siteMetadata' | import siteMetadata from '@/data/siteMetadata' | ||||||
|  | import { notFound } from 'next/navigation' | ||||||
|  |  | ||||||
| const defaultLayout = 'PostLayout' | const defaultLayout = 'PostLayout' | ||||||
| const layouts = { | const layouts = { | ||||||
| @@ -85,16 +86,7 @@ export default async function Page({ params }: { params: { slug: string[] } }) { | |||||||
|   const sortedCoreContents = allCoreContent(sortPosts(allBlogs)) |   const sortedCoreContents = allCoreContent(sortPosts(allBlogs)) | ||||||
|   const postIndex = sortedCoreContents.findIndex((p) => p.slug === slug) |   const postIndex = sortedCoreContents.findIndex((p) => p.slug === slug) | ||||||
|   if (postIndex === -1) { |   if (postIndex === -1) { | ||||||
|     return ( |     return notFound() | ||||||
|       <div className="mt-24 text-center"> |  | ||||||
|         <PageTitle> |  | ||||||
|           Under Construction{' '} |  | ||||||
|           <span role="img" aria-label="roadwork sign"> |  | ||||||
|             🚧 |  | ||||||
|           </span> |  | ||||||
|         </PageTitle> |  | ||||||
|       </div> |  | ||||||
|     ) |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   const prev = sortedCoreContents[postIndex + 1] |   const prev = sortedCoreContents[postIndex + 1] | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user