Removed route for meta
All checks were successful
Build and Deploy Astro Site / deploy (push) Successful in 55s
All checks were successful
Build and Deploy Astro Site / deploy (push) Successful in 55s
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
import MarkdocRenderer from '@/components/Markdoc/Renderer'
|
||||
import { getArticleBySlug, getArticles } from '@/lib/content/meta/articles'
|
||||
import { notFound } from 'next/navigation'
|
||||
|
||||
interface Props {
|
||||
params: Promise<{
|
||||
slug: string
|
||||
}>
|
||||
}
|
||||
|
||||
export async function generateStaticParams() {
|
||||
const articles = await getArticles()
|
||||
return articles.map(({ slug }) => ({ slug }))
|
||||
}
|
||||
|
||||
export default async function MetaArticlePage({ params }: Props) {
|
||||
const { slug } = await params
|
||||
const article = await getArticleBySlug(slug)
|
||||
|
||||
if (!article) {
|
||||
notFound()
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="page">
|
||||
<h1>{article.title}</h1>
|
||||
<MarkdocRenderer content={article.content} className="meta-content" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user