mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-08-25 13:51:15 +00:00
Update Faq
This commit is contained in:
@@ -6,7 +6,6 @@ import * as gfm from "remark-gfm"
|
||||
import dynamic from "next/dynamic"
|
||||
import React from "react"
|
||||
import parse from "html-react-parser"
|
||||
import Footer from "@/components/footer"
|
||||
|
||||
const CopyableCode = dynamic(() => import("@/components/CopyableCode"), { ssr: false })
|
||||
|
||||
@@ -14,23 +13,23 @@ async function getCodeOfConductContent() {
|
||||
try {
|
||||
const codeOfConductPath = path.join(process.cwd(), "..", "CODE_OF_CONDUCT.md")
|
||||
|
||||
if (!fs.existsSync(codeOfConductPath)) {
|
||||
console.error("❌ Archivo CODE_OF_CONDUCT.md no encontrado.")
|
||||
return "<p class='text-red-600'>Error: No se encontró el archivo CODE_OF_CONDUCT.md</p>"
|
||||
}
|
||||
|
||||
const fileContents = fs.readFileSync(codeOfConductPath, "utf8")
|
||||
|
||||
const result = await remark()
|
||||
.use(gfm.default || gfm)
|
||||
.use(html)
|
||||
.process(fileContents)
|
||||
|
||||
return result.toString()
|
||||
} catch (error) {
|
||||
console.error("❌ Error al leer el archivo CODE_OF_CONDUCT.md", error)
|
||||
return "<p class='text-red-600'>Error: No se pudo cargar el contenido del Código de Conducta.</p>"
|
||||
if (!fs.existsSync(codeOfConductPath)) {
|
||||
console.error("CODE_OF_CONDUCT.md file not found.");
|
||||
return "<p class='text-red-600'>Error: CODE_OF_CONDUCT.md file not found.</p>";
|
||||
}
|
||||
|
||||
const fileContents = fs.readFileSync(codeOfConductPath, "utf8");
|
||||
|
||||
const result = await remark()
|
||||
.use(gfm.default || gfm)
|
||||
.use(html)
|
||||
.process(fileContents);
|
||||
|
||||
return result.toString();
|
||||
} catch (error) {
|
||||
console.error("Error reading the CODE_OF_CONDUCT.md file", error);
|
||||
return "<p class='text-red-600'>Error: Unable to load the Code of Conduct content.</p>";
|
||||
}
|
||||
}
|
||||
|
||||
function cleanInlineCode(content: string) {
|
||||
@@ -61,10 +60,8 @@ export default async function CodeOfConductPage() {
|
||||
return (
|
||||
<div className="min-h-screen bg-white text-gray-900">
|
||||
<div className="container mx-auto px-4 py-16" style={{ maxWidth: "980px" }}>
|
||||
<h1 className="text-4xl font-bold mb-8">Code of Conduct</h1>
|
||||
<div className="prose max-w-none text-[16px]">{parsedContent}</div>
|
||||
</div>
|
||||
<Footer />
|
||||
</div>
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user