Update page.tsx

This commit is contained in:
MacRimi 2025-02-16 13:44:18 +01:00 committed by GitHub
parent 6d16962eb7
commit b9ca2f92f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,3 @@
import type React from "react"
import fs from "fs"
import path from "path"
import matter from "gray-matter"
@ -14,7 +13,7 @@ interface Guide {
}
function getGuides(): Guide[] {
let guides: Guide[] = []
const guides: Guide[] = []
function findGuides(dir: string, basePath = "") {
fs.readdirSync(dir, { withFileTypes: true }).forEach((entry) => {
@ -26,7 +25,6 @@ function getGuides(): Guide[] {
} else if (entry.isFile() && entry.name.endsWith(".md")) {
const slug = relativePath.replace(/\.md$/, "")
const fileContents = fs.readFileSync(fullPath, "utf8")
const { data } = matter(fileContents)
@ -48,10 +46,10 @@ export default function GuidesPage() {
return (
<div className="min-h-screen bg-gradient-to-b from-gray-900 to-gray-800 text-white pt-16 flex flex-col">
<div className="container mx-auto px-4 py-16">
<div className="flex-grow container mx-auto px-4 py-16">
<h1 className="text-4xl font-bold mb-8">ProxMenux Guides</h1>
<p className="text-xl mb-8">Complementary guides to make the most of your Proxmox VE.</p>
<div className="grid md:grid-cols-2 gap-6">
<div className="grid md:grid-cols-2 gap-6 mb-12">
{guides.map((guide) => (
<Link
key={guide.slug}
@ -63,6 +61,31 @@ export default function GuidesPage() {
</Link>
))}
</div>
<h2 className="text-3xl font-bold mb-6">Additional Resources</h2>
<div className="grid md:grid-cols-2 gap-6">
<a
href="https://github.com/community-scripts/ProxmoxVE/blob/main/USER_SUBMITTED_GUIDES.md"
target="_blank"
rel="noopener noreferrer"
className="block p-6 bg-blue-600 rounded-lg shadow-md hover:bg-blue-700 transition-colors"
>
<h2 className="text-2xl font-semibold mb-2 text-white">Community Helper Scripts</h2>
<p className="text-gray-200">
Explore user-submitted guides and scripts for Proxmox VE from the community.
</p>
</a>
<a
href="https://pve.proxmox.com/pve-docs/index.html"
target="_blank"
rel="noopener noreferrer"
className="block p-6 bg-green-600 rounded-lg shadow-md hover:bg-green-700 transition-colors"
>
<h2 className="text-2xl font-semibold mb-2 text-white">Official Proxmox Documentation</h2>
<p className="text-gray-200">
Access the official Proxmox VE documentation for comprehensive guides and information.
</p>
</a>
</div>
</div>
<Footer2 />
</div>