diff --git a/web/app/docs/about/code-of-conduct/page.tsx b/web/app/docs/about/code-of-conduct/page.tsx new file mode 100644 index 0000000..e949ef5 --- /dev/null +++ b/web/app/docs/about/code-of-conduct/page.tsx @@ -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 "
Error: No se encontró el archivo CODE_OF_CONDUCT.md
" + } + + 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 "Error: No se pudo cargar el contenido del Código de Conducta.
" + } +} + +function cleanInlineCode(content: string) { + return content.replace(/(.*?)<\/code>/g, (_, codeContent) => {
+ return `${codeContent.replace(/^`|`$/g, "")}
`
+ })
+}
+
+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
+ }
+ }
+ }
+ })
+}
+
+export default async function CodeOfConductPage() {
+ const codeOfConductContent = await getCodeOfConductContent()
+ const cleanedInlineCode = cleanInlineCode(codeOfConductContent)
+ const parsedContent = wrapCodeBlocksWithCopyable(cleanedInlineCode)
+
+ return (
+
+
+ Code of Conduct
+ {parsedContent}
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/web/app/docs/about/faq/page.tsx b/web/app/docs/about/faq/page.tsx
new file mode 100644
index 0000000..f4f3bac
--- /dev/null
+++ b/web/app/docs/about/faq/page.tsx
@@ -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 (
+
+ {number}
+
+ );
+}
+
+export default function FaqPage() {
+ return (
+
+
+
+ Frequently Asked Questions (FAQ)
+
+
+ {/* 1️⃣ What is ProxMenux? */}
+
+
+ What is ProxMenux, and what is it used for?
+
+
+ ProxMenux is an interactive menu-driven tool designed to make Proxmox VE accessible to
+ all users, regardless of their technical experience. It allows users to execute commands and manage Proxmox VE
+ without requiring advanced Linux knowledge.
+
+
+ Proxmox VE is widely used for:
+
+
+ - Enterprise-grade virtualization
+ - HomeLab and personal cloud solutions
+ - Multimedia servers, automation, and more
+
+
+ {/* 2️⃣ Installation */}
+
+
+ How do I install ProxMenux?
+
+
+ Follow the instructions in the{" "}
+
+ Installation Guide
+ . You can install ProxMenux by running:
+
+
+
+ bash -c "$(wget -qLO - https://raw.githubusercontent.com/MacRimi/ProxMenux/main/install_proxmenux.sh)"
+
+
+ Once installed, launch it with:
+
+ menu
+
+
+ {/* 3️⃣ Compatibility */}
+
+
+ Is ProxMenux compatible with all Proxmox versions?
+
+
+ No, ProxMenux is only compatible with Proxmox VE 8 and later versions.
+
+
+ {/* 4️⃣ Customization */}
+
+
+ Can I customize ProxMenux?
+
+
+ The core scripts cannot be modified directly as they are hosted on GitHub, but you can personalize the
+ console logo using the FastFetch tool in the Post-Install options.
+
+
+ {/* 5️⃣ Updates */}
+
+
+ How do I update ProxMenux?
+
+
+ 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.
+
+
+ {/* 6️⃣ Reporting Issues */}
+
+
+ Where can I report issues?
+
+
+ If you encounter bugs or errors, report them in the{" "}
+
+ Issues section
+ .
+
+
+ {/* 7️⃣ Contributing */}
+
+
+ Can I contribute to ProxMenux?
+
+
+ Yes! ProxMenux is an open-source project, and contributions are welcome.
+ You can share ideas or discuss improvements in the{" "}
+
+ Discussions section
+ .
+ Make sure to check the{" "}
+
+ Code of Conduct & Best Practices
+ .
+
+
+ {/* 8️⃣ System Modifications */}
+
+
+ Does ProxMenux modify critical system files?
+
+
+ No, ProxMenux does not modify critical Proxmox system files.
+ It only installs dependencies and downloads its scripts into{" "}
+ /usr/local/share/proxmenux/
.
+
+
+ );
+}
diff --git a/web/app/docs/external-repo/page.tsx b/web/app/docs/external-repo/page.tsx
deleted file mode 100644
index b32a22b..0000000
--- a/web/app/docs/external-repo/page.tsx
+++ /dev/null
@@ -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 (
-
-
-
-
-
-
- )
-}
diff --git a/web/app/docs/external-repositories/page.tsx b/web/app/docs/external-repositories/page.tsx
new file mode 100644
index 0000000..e313d3d
--- /dev/null
+++ b/web/app/docs/external-repositories/page.tsx
@@ -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 (
+
+
+ {number}
+
+ {title}
+
+ );
+}
+
+export default function ExternalRepositoriesPage() {
+ return (
+
+
+
+ External Repositories
+
+
+ {/* Introduction */}
+
+ 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.
+
+
+ When an external script is available as an alternative, **ProxMenux will clearly indicate that it
+ originates from an external repository and specify which one.**
+
+
+ {/* 1️⃣ Example of External Repository */}
+
+
+ One essential repository for Proxmox VE users is:
+
+
+
+ Proxmox VE Helper-Scripts
+ {" "}
+ - A highly recommended repository that provides additional tools and utilities for
+ managing Proxmox VE more efficiently.
+
+
+ {/* 2️⃣ Attribution & Recognition */}
+
+
+ - Credit is always given to the original authors.
+ - A link to the source repository is provided.
+ - Users are encouraged to support the developers of these external projects.
+
+
+ {/* 3️⃣ Reporting Issues with External Scripts */}
+
+
+ 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.
+
+
+ **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.
+
+
+ {/* 4️⃣ Suggesting New External Repositories */}
+
+
+ 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.
+
+
+ 🔗{" "}
+
+ Open a Discussion
+ {" "}
+ |{" "}
+
+ Report an Issue
+
+
+
+ );
+}
diff --git a/web/components/DocSidebar.tsx b/web/components/DocSidebar.tsx
index 8a5cc0f..6a49713 100644
--- a/web/components/DocSidebar.tsx
+++ b/web/components/DocSidebar.tsx
@@ -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() {