Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createMDX } from 'fumadocs-mdx/next';
import { createMDX } from "fumadocs-mdx/next";

const withMDX = createMDX();

Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
"postinstall": "fumadocs-mdx"
},
"dependencies": {
"fumadocs-core": "15.3.1",
"fumadocs-mdx": "11.6.3",
"fumadocs-ui": "15.3.1",
"lucide-react": "^0.525.0",
"next": "15.3.1",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"fumadocs-ui": "15.3.1",
"fumadocs-core": "15.3.1",
"fumadocs-mdx": "11.6.3"
"react-dom": "^19.1.0"
},
"devDependencies": {
"@types/node": "22.15.12",
Expand Down
2 changes: 1 addition & 1 deletion source.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
defineDocs,
frontmatterSchema,
metaSchema,
} from 'fumadocs-mdx/config';
} from "fumadocs-mdx/config";

// You can customise Zod schemas for frontmatter and `meta.json` here
// see https://fumadocs.vercel.app/docs/mdx/collections#define-docs
Expand Down
19 changes: 0 additions & 19 deletions src/app/(home)/layout.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions src/app/(home)/page.tsx

This file was deleted.

23 changes: 23 additions & 0 deletions src/app/(site)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import type { ReactNode } from "react";
import { HomeLayout } from "fumadocs-ui/layouts/home";
import { baseOptions } from "@/app/layout.config";

export default function Layout({ children }: { children: ReactNode }) {
return (
<HomeLayout
{...baseOptions}
links={[
{
text: "Documentation",
url: "/docs",
},
{
text: "Programs",
url: "/programs",
},
]}
>
{children}
</HomeLayout>
);
}
28 changes: 28 additions & 0 deletions src/app/(site)/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import Link from "next/link";

export default function HomePage() {
return (
<main className="flex flex-1 flex-col justify-center text-center">
<h1 className="text-5xl font-extrabold leading-none tracking-tight text-gray-900 dark:text-white sm:text-6xl lg:text-7xl max-w-6xl mx-auto">
Learn{" "}
<span className="bg-gradient-to-br from-green-400 to-cyan-500 bg-clip-text font-extrabold text-transparent">
Java
</span>{" "}
programming very fast and easily with{" "}
<span className="bg-gradient-to-br from-sky-400 to-indigo-500 bg-clip-text font-extrabold text-transparent">
Javaistic.
</span>
</h1>
<p className="text-fd-muted-foreground">
You can open{" "}
<Link
href="/docs/installation"
className="text-fd-foreground font-semibold underline"
>
/docs/installation
</Link>{" "}
and see the documentation.
</p>
</main>
);
}
19 changes: 13 additions & 6 deletions src/app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { source } from '@/lib/source';
import { source } from "@/lib/source";
import {
DocsPage,
DocsBody,
DocsDescription,
DocsTitle,
} from 'fumadocs-ui/page';
import { notFound } from 'next/navigation';
import { createRelativeLink } from 'fumadocs-ui/mdx';
import { getMDXComponents } from '@/mdx-components';
} from "fumadocs-ui/page";
import { notFound } from "next/navigation";
import { createRelativeLink } from "fumadocs-ui/mdx";
import { getMDXComponents } from "@/mdx-components";

export default async function Page(props: {
params: Promise<{ slug?: string[] }>;
Expand All @@ -19,7 +19,14 @@ export default async function Page(props: {
const MDXContent = page.data.body;

return (
<DocsPage toc={page.data.toc} full={page.data.full}>
<DocsPage
toc={page.data.toc}
tableOfContent={{
style: "clerk",
single: false,
}}
full={page.data.full}
>
<DocsTitle>{page.data.title}</DocsTitle>
<DocsDescription>{page.data.description}</DocsDescription>
<DocsBody>
Expand Down
8 changes: 4 additions & 4 deletions src/app/docs/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
import type { ReactNode } from 'react';
import { baseOptions } from '@/app/layout.config';
import { source } from '@/lib/source';
import { DocsLayout } from "fumadocs-ui/layouts/docs";
import type { ReactNode } from "react";
import { baseOptions } from "@/app/layout.config";
import { source } from "@/lib/source";

export default function Layout({ children }: { children: ReactNode }) {
return (
Expand Down
6 changes: 3 additions & 3 deletions src/app/global.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@import 'tailwindcss';
@import 'fumadocs-ui/css/neutral.css';
@import 'fumadocs-ui/css/preset.css';
@import "tailwindcss";
@import "fumadocs-ui/css/vitepress.css";
@import "fumadocs-ui/css/preset.css";
2 changes: 1 addition & 1 deletion src/app/layout.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const baseOptions: BaseLayoutProps = {
>
<circle cx={12} cy={12} r={12} fill="currentColor" />
</svg>
My App
Javaistic
</>
),
},
Expand Down
15 changes: 12 additions & 3 deletions src/lib/source.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
import { docs } from '@/.source';
import { loader } from 'fumadocs-core/source';
import { docs } from "@/.source";
import { loader } from "fumadocs-core/source";
import { icons } from "lucide-react";
import { createElement } from "react";

// See https://fumadocs.vercel.app/docs/headless/source-api for more info
export const source = loader({
// it assigns a URL to your pages
baseUrl: '/docs',
baseUrl: "/docs",
source: docs.toFumadocsSource(),
icon(icon) {
if (!icon) {
// You may set a default icon
return;
}
if (icon in icons) return createElement(icons[icon as keyof typeof icons]);
},
});
4 changes: 2 additions & 2 deletions src/mdx-components.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import defaultMdxComponents from 'fumadocs-ui/mdx';
import type { MDXComponents } from 'mdx/types';
import defaultMdxComponents from "fumadocs-ui/mdx";
import type { MDXComponents } from "mdx/types";

// use this function to get MDX components, you will need it for rendering MDX
export function getMDXComponents(components?: MDXComponents): MDXComponents {
Expand Down