25 lines
489 B
Plaintext
25 lines
489 B
Plaintext
---
|
|
import Layout from '../../layouts/Layout.astro'
|
|
import { getEntry } from 'astro:content'
|
|
import StatusCode from '../../libs/HTTP/StatusCode'
|
|
|
|
const page = Astro.params.page
|
|
|
|
let Result: any
|
|
|
|
const entry = await getEntry('docs', page as any)
|
|
if (!entry) {
|
|
Astro.response.status = StatusCode.NOT_FOUND
|
|
} else {
|
|
const { Content } = await entry.render()
|
|
Result = Content
|
|
}
|
|
---
|
|
|
|
<Layout title={entry?.data.title ?? ''}>
|
|
<main class="prose">
|
|
{Result && <Result />}
|
|
|
|
</main>
|
|
</Layout>
|