This commit is contained in:
MacRimi
2025-02-14 10:25:31 +01:00
parent 990b2bf7de
commit 68cbedcfd7
10 changed files with 91 additions and 196 deletions

View File

@@ -2,6 +2,7 @@ import fs from "fs"
import path from "path"
import { remark } from "remark"
import html from "remark-html"
import DocsLayout from "../components/docs-layout"
async function getChangelog() {
const changelogPath = path.join(process.cwd(), "..", "CHANGELOG.md")
@@ -15,10 +16,12 @@ export default async function ChangelogPage() {
const changelogContent = await getChangelog()
return (
<div className="container mx-auto px-4 py-16 max-w-4xl">
<h1 className="text-4xl font-bold mb-8">Changelog</h1>
<div className="prose prose-lg dark:prose-invert" dangerouslySetInnerHTML={{ __html: changelogContent }} />
</div>
<DocsLayout>
<div className="container mx-auto px-4 py-16 max-w-4xl">
<h1 className="text-4xl font-bold mb-8">Changelog</h1>
<div className="prose prose-lg" dangerouslySetInnerHTML={{ __html: changelogContent }} />
</div>
</DocsLayout>
)
}

View File

@@ -0,0 +1,8 @@
"use client"
import type React from "react"
export default function DocsLayout({ children }: { children: React.ReactNode }) {
return <div className="min-h-screen bg-white text-gray-900">{children}</div>
}

View File

@@ -2,6 +2,7 @@ import fs from "fs"
import path from "path"
import { remark } from "remark"
import html from "remark-html"
import DocsLayout from "../../components/docs-layout"
async function getGuideContent(slug: string) {
const guidePath = path.join(process.cwd(), "..", "guides", `${slug}.md`)
@@ -22,9 +23,11 @@ export default async function GuidePage({ params }: { params: { slug: string } }
const guideContent = await getGuideContent(params.slug)
return (
<div className="container mx-auto px-4 py-16 max-w-3xl">
<div className="prose prose-lg dark:prose-invert" dangerouslySetInnerHTML={{ __html: guideContent }} />
</div>
<DocsLayout>
<div className="container mx-auto px-4 py-16 max-w-3xl">
<div className="prose prose-lg" dangerouslySetInnerHTML={{ __html: guideContent }} />
</div>
</DocsLayout>
)
}

View File

@@ -1,3 +1,5 @@
const path = require("path")
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "export",
@@ -6,6 +8,11 @@ const nextConfig = {
},
assetPrefix: "/ProxMenux/",
basePath: "/ProxMenux",
webpack: (config, { isServer }) => {
config.resolve.alias["@guides"] = path.join(__dirname, "..", "guides")
config.resolve.alias["@changelog"] = path.join(__dirname, "..", "CHANGELOG.md")
return config
},
}
module.exports = nextConfig