mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-07-05 15:06:53 +00:00
Update page.tsx
This commit is contained in:
parent
19dac7388a
commit
80779c8df3
@ -4,11 +4,17 @@ import { remark } from "remark"
|
||||
import html from "remark-html"
|
||||
|
||||
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 result = await remark().use(html).process(fileContents)
|
||||
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>"
|
||||
}
|
||||
}
|
||||
|
||||
export default async function ChangelogPage() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user