feat: add research submodule and page

This commit is contained in:
ryanchristo 2024-08-31 11:31:50 -07:00
parent 4a39e535a3
commit 3af3260500
12 changed files with 68 additions and 48 deletions

View file

@ -5,30 +5,30 @@ import { getDoc, getDocs } from '@utils'
import styles from './page.module.css'
export const metadata: Metadata = {
title: 'chora blog | news',
title: 'chora studio | research',
}
export const generateStaticParams = () => {
return getDocs()
}
const PostPage = async ({ params }: any) => {
const post = await getDoc(params.id)
const DocumentPage = async ({ params }: any) => {
const doc = await getDoc(params.id)
return (
<div className={styles.page}>
<div className={styles.banner}>
<div>
<h3>{post.date}</h3>
<h1>{post.title}</h1>
<h2>{`by ${post.author}`}</h2>
<h3>{doc.date}</h3>
<h1>{doc.title}</h1>
<h2>{`by ${doc.author}`}</h2>
</div>
</div>
<div className={styles.content}>
<div dangerouslySetInnerHTML={{ __html: post.content }} />
<div dangerouslySetInnerHTML={{ __html: doc.content }} />
</div>
</div>
)
}
export default PostPage
export default DocumentPage