mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-06-30 21:26:53 +00:00
Update page.tsx
This commit is contained in:
parent
80779c8df3
commit
d5ff610f9c
@ -5,16 +5,10 @@ import html from "remark-html"
|
|||||||
|
|
||||||
async function getChangelog() {
|
async function getChangelog() {
|
||||||
const changelogPath = path.join(process.cwd(), "..", "CHANGELOG.md")
|
const changelogPath = path.join(process.cwd(), "..", "CHANGELOG.md")
|
||||||
try {
|
const fileContents = fs.readFileSync(changelogPath, "utf8")
|
||||||
const fileContents = fs.readFileSync(changelogPath, "utf8")
|
|
||||||
const result = await remark()
|
const result = await remark().use(html).process(fileContents)
|
||||||
.use(html) // No usar sanitize: false a menos que sea seguro
|
return result.toString()
|
||||||
.process(fileContents)
|
|
||||||
return result.toString()
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Error reading changelog file:", error)
|
|
||||||
return "<p>Changelog content not found.</p>"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function ChangelogPage() {
|
export default async function ChangelogPage() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user