docs complete except the content

This commit is contained in:
Cypro Freelance 2024-06-24 13:32:18 +05:30
parent a4ae47b283
commit 95ec5c3ce2
15 changed files with 4748 additions and 145 deletions

View file

@ -1,15 +0,0 @@
import Sidebar from "@/components/shared/Sidebar";
import { Metadata } from "next";
export const metadata: Metadata = {
title: "Docs - SVRJS",
};
export default function Page() {
return (
<>
<Sidebar />
</>
);
}

View file

@ -0,0 +1,13 @@
import { Metadata } from "next";
export const metadata: Metadata = {
title: "Downloads - SVRJS",
};
export default function DownloadLayout({
children,
}: {
children: React.ReactNode;
}) {
return <main>{children}</main>;
}

11
app/api/search/route.ts Normal file
View file

@ -0,0 +1,11 @@
import { getPages } from "@/app/source";
import { createSearchAPI } from "fumadocs-core/search/server";
export const { GET } = createSearchAPI("advanced", {
indexes: getPages().map((page) => ({
title: page.data.title,
structuredData: page.data.exports.structuredData,
id: page.url,
url: page.url,
})),
});

View file

@ -1,24 +0,0 @@
import React from "react";
const Sidebar = () => {
return (
<div className="w-[250px] h-[100vh] border-r dark:border-r-slate-800 pl-4 pt-2">
<span className="flex flex-col gap-2">
<h2 className="text-2xl font-bold">First use</h2>
<ul className="pl-4 flex flex-col gap-2">
<li>System requirements</li>
<li>Installation</li>
<li>Features</li>
<li>SVR.JS files</li>
<li>SVR.JS utilities</li>
<li>SVR.JS commands</li>
<li>Updating SVR.JS</li>
<li>Common problems</li>
<li>Bun support</li>
</ul>
</span>
</div>
);
};
export default Sidebar;

View file

@ -1,4 +1,11 @@
/** @type {import('next').NextConfig} */ import nextra from "nextra";
const nextConfig = {};
export default nextConfig; /** @type {import('next').NextConfig} */
const NextConfig = {};
const withNextra = nextra({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
});
export default withNextra(NextConfig);

4571
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -18,6 +18,7 @@
"@radix-ui/react-slot": "^1.1.0", "@radix-ui/react-slot": "^1.1.0",
"@radix-ui/themes": "^3.0.5", "@radix-ui/themes": "^3.0.5",
"@types/cookie": "^0.6.0", "@types/cookie": "^0.6.0",
"@types/mdx": "^2.0.13",
"@uploadthing/react": "^6.6.0", "@uploadthing/react": "^6.6.0",
"class-variance-authority": "^0.7.0", "class-variance-authority": "^0.7.0",
"clsx": "^2.1.1", "clsx": "^2.1.1",
@ -26,8 +27,9 @@
"lucide-react": "^0.394.0", "lucide-react": "^0.394.0",
"mini-svg-data-uri": "^1.4.4", "mini-svg-data-uri": "^1.4.4",
"mongoose": "^8.4.3", "mongoose": "^8.4.3",
"next": "14.2.3",
"next-themes": "^0.3.0", "next-themes": "^0.3.0",
"nextra": "^2.13.4",
"nextra-theme-docs": "^2.13.4",
"react": "^18", "react": "^18",
"react-dom": "^18", "react-dom": "^18",
"react-hook-form": "^7.52.0", "react-hook-form": "^7.52.0",

7
pages/_meta.json Normal file
View file

@ -0,0 +1,7 @@
{
"docs" : {
"title" : "docs",
"type": "page",
"display" : "hidden"
}
}

4
pages/docs/_meta.json Normal file
View file

@ -0,0 +1,4 @@
{
"index" : "Getting Started",
"test": "Test"
}

7
pages/docs/index.mdx Normal file
View file

@ -0,0 +1,7 @@
---
title: Getting started
---
# maybe
## asjdiasd

1
pages/docs/test.mdx Normal file
View file

@ -0,0 +1 @@
# gsdasd

9
public/plainlogo.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 29 KiB

View file

@ -3,21 +3,22 @@ import type { Config } from "tailwindcss";
const config = { const config = {
darkMode: ["class"], darkMode: ["class"],
content: [ content: [
"./pages/**/*.{ts,tsx}", "./theme.config.tsx",
"./components/**/*.{ts,tsx}", "./pages/**/*.{ts,tsx,md,mdx}",
"./components/**/*.{ts,tsx,md,mdx}",
"./app/**/*.{ts,tsx}", "./app/**/*.{ts,tsx}",
"./src/**/*.{ts,tsx}", "./src/**/*.{ts,tsx}",
], ],
prefix: "", prefix: "",
theme: { theme: {
screens: { screens: {
"sm": "640px", sm: "640px",
"md": "768px", md: "768px",
"lg": "1100px", lg: "1100px",
"xl": "1280px", xl: "1280px",
"2xl": "1536px", "2xl": "1536px",
}, },

49
theme.config.tsx Normal file
View file

@ -0,0 +1,49 @@
import { useRouter } from "next/router";
export default {
editLink: {
component: null,
},
feedback: {
content: null,
},
logo: (
<>
<img
src="/plainlogo.svg"
alt={`logo`}
width={25}
height={25}
className="dark:block hidden"
/>
<h1
style={{
fontWeight: 700,
fontSize: "30px",
marginLeft: "8px",
}}
>
SVRJS
</h1>
</>
),
project: {
title: "SVRJS",
link: "https://svrjs.org",
},
footer: {
component: null,
},
useNextSeoProps() {
const { asPath } = useRouter();
if (asPath !== "/") {
return {
titleTemplate: "%s SVRJS",
};
}
},
// banner: {
// key: "svrjs",
// text: <a href="https://svrjs.org">🎉 Check out SVRJS Now. Read more →</a>,
// },
};

View file

@ -21,6 +21,6 @@
"@/*": ["./*"] "@/*": ["./*"]
} }
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "lib/Hoc/withAuth.jsx"], "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "lib/Hoc/withAuth.jsx" , "**/*.mdx"],
"exclude": ["node_modules"] "exclude": ["node_modules"]
} }