Update page.tsx

This commit is contained in:
MacRimi
2025-02-14 17:34:59 +01:00
committed by GitHub
parent 80779c8df3
commit d5ff610f9c

View File

@@ -5,16 +5,10 @@ import html from "remark-html"
async function getChangelog() {
const changelogPath = path.join(process.cwd(), "..", "CHANGELOG.md")
try {
const fileContents = fs.readFileSync(changelogPath, "utf8")
const result = await remark()
.use(html) // No usar sanitize: false a menos que sea seguro
.process(fileContents)
return result.toString()
} catch (error) {
console.error("Error reading changelog file:", error)
return "<p>Changelog content not found.</p>"
}
const fileContents = fs.readFileSync(changelogPath, "utf8")
const result = await remark().use(html).process(fileContents)
return result.toString()
}
export default async function ChangelogPage() {