Upate code-of-conduct page

This commit is contained in:
MacRimi 2025-03-07 17:07:21 +01:00
parent 935cc5c0a3
commit 12bd78d2d6
5 changed files with 359 additions and 16 deletions

View File

@ -0,0 +1,70 @@
import fs from "fs"
import path from "path"
import { remark } from "remark"
import html from "remark-html"
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 })
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>"
}
}
function cleanInlineCode(content: string) {
return content.replace(/<code>(.*?)<\/code>/g, (_, codeContent) => {
return `<code class="bg-gray-200 text-gray-900 px-1 rounded">${codeContent.replace(/^`|`$/g, "")}</code>`
})
}
function wrapCodeBlocksWithCopyable(content: string) {
return parse(content, {
replace: (domNode: any) => {
if (domNode.name === "pre" && domNode.children.length > 0) {
const codeElement = domNode.children.find((child: any) => child.name === "code")
if (codeElement) {
const codeContent = codeElement.children[0]?.data?.trim() || ""
return <CopyableCode code={codeContent} />
}
}
}
})
}
export default async function CodeOfConductPage() {
const codeOfConductContent = await getCodeOfConductContent()
const cleanedInlineCode = cleanInlineCode(codeOfConductContent)
const parsedContent = wrapCodeBlocksWithCopyable(cleanedInlineCode)
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>
)
}

View File

@ -0,0 +1,156 @@
import type { Metadata } from "next";
import { HelpCircle } from "lucide-react";
import Link from "next/link";
export const metadata: Metadata = {
title: "ProxMenux FAQ Frequently Asked Questions",
description: "Frequently Asked Questions about ProxMenux, including installation, updates, compatibility, and security.",
openGraph: {
title: "ProxMenux FAQ Frequently Asked Questions",
description: "Frequently Asked Questions about ProxMenux, including installation, updates, compatibility, and security.",
type: "article",
url: "https://macrimi.github.io/ProxMenux/docs/faq",
images: [
{
url: "https://macrimi.github.io/ProxMenux/faq-image.png",
width: 1200,
height: 630,
alt: "ProxMenux FAQ",
},
],
},
twitter: {
card: "summary_large_image",
title: "ProxMenux FAQ Frequently Asked Questions",
description: "Frequently Asked Questions about ProxMenux, including installation, updates, compatibility, and security.",
images: ["https://macrimi.github.io/ProxMenux/faq-image.png"],
},
};
function StepNumber({ number }: { number: number }) {
return (
<div className="inline-flex items-center justify-center w-8 h-8 mr-3 text-white bg-blue-500 rounded-full">
<span className="text-sm font-bold">{number}</span>
</div>
);
}
export default function FaqPage() {
return (
<div className="container mx-auto px-4 py-8">
<div className="flex items-center mb-6">
<HelpCircle className="h-8 w-8 mr-2 text-blue-500" />
<h1 className="text-3xl font-bold">Frequently Asked Questions (FAQ)</h1>
</div>
{/* 1⃣ What is ProxMenux? */}
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={1} />
What is ProxMenux, and what is it used for?
</h3>
<p className="mb-4">
<strong>ProxMenux</strong> is an interactive menu-driven tool designed to make <strong>Proxmox VE</strong> accessible to
all users, regardless of their technical experience. It allows users to execute commands and manage Proxmox VE
without requiring advanced Linux knowledge.
</p>
<p className="mb-4">
Proxmox VE is widely used for:
</p>
<ul className="list-disc list-inside mb-4 ml-4">
<li>Enterprise-grade virtualization</li>
<li>HomeLab and personal cloud solutions</li>
<li>Multimedia servers, automation, and more</li>
</ul>
{/* 2⃣ Installation */}
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={2} />
How do I install ProxMenux?
</h3>
<p className="mb-4">
Follow the instructions in the{" "}
<Link href="https://macrimi.github.io/ProxMenux/docs/installation" className="text-blue-500 hover:underline">
Installation Guide
</Link>. You can install ProxMenux by running:
</p>
<pre className="bg-gray-100 p-4 rounded-md overflow-x-auto text-sm">
<code>
bash -c "$(wget -qLO - https://raw.githubusercontent.com/MacRimi/ProxMenux/main/install_proxmenux.sh)"
</code>
</pre>
<p className="mt-4">Once installed, launch it with:</p>
<pre className="bg-gray-100 p-4 rounded-md overflow-x-auto text-sm">
<code>menu</code>
</pre>
{/* 3⃣ Compatibility */}
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={3} />
Is ProxMenux compatible with all Proxmox versions?
</h3>
<p className="mb-4">
No, <strong>ProxMenux is only compatible with Proxmox VE 8 and later versions.</strong>
</p>
{/* 4⃣ Customization */}
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={4} />
Can I customize ProxMenux?
</h3>
<p className="mb-4">
The core scripts cannot be modified directly as they are hosted on GitHub, but you can personalize the
<strong> console logo </strong> using the <strong> FastFetch </strong> tool in the Post-Install options.
</p>
{/* 5⃣ Updates */}
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={5} />
How do I update ProxMenux?
</h3>
<p className="mb-4">
When a new version is available, ProxMenux will automatically detect it upon launch and ask if you want to update.
The update process will replace utility files and configurations.
</p>
{/* 6⃣ Reporting Issues */}
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={6} />
Where can I report issues?
</h3>
<p className="mb-4">
If you encounter bugs or errors, report them in the{" "}
<Link href="https://github.com/MacRimi/ProxMenux/issues" className="text-blue-500 hover:underline">
Issues section
</Link>.
</p>
{/* 7⃣ Contributing */}
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={7} />
Can I contribute to ProxMenux?
</h3>
<p className="mb-4">
Yes! ProxMenux is an open-source project, and contributions are welcome.
You can share ideas or discuss improvements in the{" "}
<Link href="https://github.com/MacRimi/ProxMenux/discussions" className="text-blue-500 hover:underline">
Discussions section
</Link>.
Make sure to check the{" "}
<Link href="https://github.com/MacRimi/ProxMenux/blob/main/CODE_OF_CONDUCT.md" className="text-blue-500 hover:underline">
Code of Conduct & Best Practices
</Link>.
</p>
{/* 8⃣ System Modifications */}
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={8} />
Does ProxMenux modify critical system files?
</h3>
<p className="mb-4">
No, <strong>ProxMenux does not modify critical Proxmox system files.</strong>
It only installs dependencies and downloads its scripts into{" "}
<code className="bg-gray-200 px-1 rounded">/usr/local/share/proxmenux/</code>.
</p>
</div>
);
}

View File

@ -1,16 +0,0 @@
import Hero2 from "@/components/hero2"
import Resources from "@/components/resources"
import SupportProject from "@/components/support-project"
import Footer from "@/components/footer"
export default function Home() {
return (
<div className="min-h-screen bg-gradient-to-b from-gray-900 to-gray-800 text-white pt-16">
<Hero2 />
<Resources />
<SupportProject />
<Footer />
</div>
)
}

View File

@ -0,0 +1,125 @@
import type { Metadata } from "next";
import { Link2 } from "lucide-react";
import Link from "next/link";
export const metadata: Metadata = {
title: "ProxMenux - External Repositories",
description:
"Learn about the external repositories used in ProxMenux, how they are selected, and how to report issues or suggest new integrations.",
openGraph: {
title: "ProxMenux - External Repositories",
description:
"Learn about the external repositories used in ProxMenux, how they are selected, and how to report issues or suggest new integrations.",
type: "article",
url: "https://macrimi.github.io/ProxMenux/docs/external-repositories",
images: [
{
url: "https://macrimi.github.io/ProxMenux/external-repos-image.png",
width: 1200,
height: 630,
alt: "ProxMenux External Repositories",
},
],
},
twitter: {
card: "summary_large_image",
title: "ProxMenux - External Repositories",
description:
"Learn about the external repositories used in ProxMenux, how they are selected, and how to report issues or suggest new integrations.",
images: ["https://macrimi.github.io/ProxMenux/external-repos-image.png"],
},
};
function SectionHeader({ number, title }: { number: number; title: string }) {
return (
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<div className="inline-flex items-center justify-center w-8 h-8 mr-3 text-white bg-blue-500 rounded-full">
<span className="text-sm font-bold">{number}</span>
</div>
{title}
</h3>
);
}
export default function ExternalRepositoriesPage() {
return (
<div className="container mx-auto px-4 py-8">
<div className="flex items-center mb-6">
<Link2 className="h-8 w-8 mr-2 text-blue-500" />
<h1 className="text-3xl font-bold">External Repositories</h1>
</div>
{/* Introduction */}
<p className="mb-4">
ProxMenux integrates with selected external repositories to provide alternative scripts for
various functionalities. These scripts come from **trusted sources** and serve as additional
options in some menu sections.
</p>
<p className="mb-4">
When an external script is available as an alternative, **ProxMenux will clearly indicate that it
originates from an external repository and specify which one.**
</p>
{/* 1⃣ Example of External Repository */}
<SectionHeader number={1} title="Example of an External Repository" />
<p className="mb-4">
One essential repository for Proxmox VE users is:
</p>
<p className="mb-4">
<Link
href="https://community-scripts.github.io/ProxmoxVE/"
className="text-blue-500 hover:underline"
target="_blank"
>
Proxmox VE Helper-Scripts
</Link>{" "}
- A highly recommended repository that provides additional tools and utilities for
managing Proxmox VE more efficiently.
</p>
{/* 2⃣ Attribution & Recognition */}
<SectionHeader number={2} title="Attribution & Recognition" />
<ul className="list-disc list-inside mb-4 ml-4">
<li>Credit is always given to the original authors.</li>
<li>A link to the source repository is provided.</li>
<li>Users are encouraged to support the developers of these external projects.</li>
</ul>
{/* 3⃣ Reporting Issues with External Scripts */}
<SectionHeader number={3} title="Reporting Issues with External Scripts" />
<p className="mb-4">
If you encounter an issue with an external script, **please report it directly to the original
repository** instead of opening an issue in the ProxMenux repository.
</p>
<p className="mb-4">
**ProxMenux does not modify external scripts**; it simply provides a link to the original source.
Therefore, any problems related to functionality should be reported to the respective developers.
</p>
{/* 4⃣ Suggesting New External Repositories */}
<SectionHeader number={4} title="Suggesting New External Repositories" />
<p className="mb-4">
If you know of a script or repository that could enhance ProxMenux, feel free to suggest it by
opening a discussion or issue in our GitHub repository.
</p>
<p className="mb-4">
🔗{" "}
<Link
href="https://github.com/MacRimi/ProxMenux/discussions"
className="text-blue-500 hover:underline"
target="_blank"
>
Open a Discussion
</Link>{" "}
|{" "}
<Link
href="https://github.com/MacRimi/ProxMenux/issues"
className="text-blue-500 hover:underline"
target="_blank"
>
Report an Issue
</Link>
</p>
</div>
);
}

View File

@ -66,6 +66,14 @@ const sidebarItems: MenuItem[] = [
{ title: "Uninstall ProxMenux", href: "/docs/settings/uninstall-proxmenux" },
],
},
{
title: "About",
submenu: [
{ title: "Code of Conduct", href: "/docs/about/code-of-conduct" },
{ title: "FAQ", href: "/docs/about/faq" },
],
},
{ title: "External Repositories", href: "/docs/external-repositories" },
]
export default function DocSidebar() {