2025-02-13 23:04:40 +01:00
|
|
|
import fs from "fs"
|
|
|
|
import path from "path"
|
|
|
|
import { remark } from "remark"
|
|
|
|
import html from "remark-html"
|
|
|
|
|
|
|
|
async function getChangelog() {
|
2025-02-14 11:19:36 +01:00
|
|
|
const changelogPath = path.join(process.cwd(), "..", "CHANGELOG.md")
|
|
|
|
try {
|
|
|
|
const fileContents = fs.readFileSync(changelogPath, "utf8")
|
|
|
|
const result = await remark().use(html).process(fileContents)
|
|
|
|
return result.toString()
|
|
|
|
} catch (error) {
|
|
|
|
console.error("Error reading changelog file:", error)
|
|
|
|
return "<p>Changelog content not found.</p>"
|
|
|
|
}
|
2025-02-13 23:04:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export default async function ChangelogPage() {
|
|
|
|
const changelogContent = await getChangelog()
|
|
|
|
|
2025-02-14 12:07:12 +01:00
|
|
|
return (
|
|
|
|
<div className="min-h-screen bg-white text-gray-900">
|
|
|
|
<div className="container mx-auto px-4 py-16 max-w-4xl">
|
|
|
|
<h1 className="text-4xl font-bold mb-8 text-gray-900">Changelog</h1>
|
|
|
|
<div className="prose prose-lg max-w-none" dangerouslySetInnerHTML={{ __html: changelogContent }} />
|
|
|
|
</div>
|
2025-02-13 23:04:40 +01:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2025-02-14 11:19:36 +01:00
|
|
|
|