23 lines
614 B
TypeScript
23 lines
614 B
TypeScript
import { promises as fs } from 'fs';
|
|
import path from 'path';
|
|
|
|
export const dynamic = 'force-static';
|
|
|
|
export default async function ReadmePage() {
|
|
const filePath = path.join(process.cwd(), 'README.md');
|
|
let content = 'README not found.';
|
|
try {
|
|
content = await fs.readFile(filePath, 'utf-8');
|
|
} catch (e) {
|
|
content = 'README not found.';
|
|
}
|
|
return (
|
|
<div className="max-w-3xl mx-auto p-6">
|
|
<h1 className="text-2xl font-semibold mb-4">README</h1>
|
|
<pre className="whitespace-pre-wrap text-sm leading-6 bg-white rounded border p-4">
|
|
{content}
|
|
</pre>
|
|
</div>
|
|
);
|
|
}
|