mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-10-03 08:36:18 +00:00
update
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
|
8
web/web/app/components/docs-layout.tsx
Normal file
8
web/web/app/components/docs-layout.tsx
Normal 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>
|
||||
}
|
||||
|
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user