mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-08-26 14:21:15 +00:00
update changelog
This commit is contained in:
@@ -1,17 +1,11 @@
|
||||
import fs from "fs"
|
||||
import path from "path"
|
||||
import { remark } from "remark"
|
||||
import html from "remark-html"
|
||||
|
||||
async function getChangelog() {
|
||||
const changelogPath = path.join(process.cwd(), "..", "CHANGELOG.md")
|
||||
try {
|
||||
const fileContents = fs.readFileSync(changelogPath, "utf8")
|
||||
|
||||
// Convertir Markdown a HTML
|
||||
const result = await remark().use(html).process(fileContents)
|
||||
|
||||
return result.toString()
|
||||
return fileContents // Ahora el archivo ya es HTML, no necesita conversión
|
||||
} catch (error) {
|
||||
console.error("Error reading changelog file:", error)
|
||||
return "<p>Changelog content not found.</p>"
|
||||
@@ -27,7 +21,7 @@ export default async function ChangelogPage() {
|
||||
<h1 className="text-4xl font-bold mb-8">Changelog</h1>
|
||||
<div
|
||||
className="prose prose-lg max-w-none bg-gray-100 p-4 border border-gray-300 rounded-md"
|
||||
dangerouslySetInnerHTML={{ __html: changelogContent }} // Renderizar como HTML
|
||||
dangerouslySetInnerHTML={{ __html: changelogContent }} // Renderiza directamente el HTML
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user