Skip to content

Commit 7f56209

Browse files
authored
V2
1 parent 019f470 commit 7f56209

27 files changed

+7999
-1747
lines changed

.gitignore

+26-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
1-
node_modules
2-
.next
1+
# deps
2+
/node_modules
3+
4+
# generated content
5+
_map.ts
6+
.contentlayer
7+
8+
# test & build
9+
/coverage
10+
/.next/
11+
/out/
12+
/build
13+
*.tsbuildinfo
14+
15+
# misc
316
.DS_Store
4-
yarn-error.log
5-
dist
6-
examples
7-
packages
17+
*.pem
18+
/.pnp
19+
.pnp.js
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*
23+
24+
# others
25+
.env*.local
26+
.vercel
27+
next-env.d.ts

.prettierignore

-2
This file was deleted.

README.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# influx-docs
2+
3+
This is a Next.js application generated with
4+
[Create Next Docs](https://github.com/fuma-nama/next-docs).
5+
6+
Run development server:
7+
8+
```bash
9+
npm run dev
10+
# or
11+
pnpm dev
12+
# or
13+
yarn dev
14+
```
15+
16+
Open http://localhost:3000 with your browser to see the result.
17+
18+
## Learn More
19+
20+
To learn more about Next.js and Next Docs, take a look at the following
21+
resources:
22+
23+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js
24+
features and API.
25+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
26+
- [Next Docs](https://next-docs-zeta.vercel.app) - learn about Next Docs

_map.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
declare const map: Record<string, unknown>
2+
3+
export { map }

app/api/search/route.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { getPageUrl, pages } from '@/app/source'
2+
import { createSearchAPI } from 'next-docs-zeta/search/server'
3+
4+
export const { GET } = createSearchAPI('advanced', {
5+
indexes: pages.map(page => ({
6+
title: page.matter.title,
7+
structuredData: page.data.structuredData,
8+
id: page.file.id,
9+
url: getPageUrl(page.slugs)
10+
}))
11+
})

app/docs/[[...slug]]/not-found.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from 'next-docs-ui/not-found'

app/docs/[[...slug]]/page.tsx

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { getPage, getPageUrl, pages, tree } from '@/app/source'
2+
import type { Metadata } from 'next'
3+
import { MDXContent } from 'next-docs-ui/mdx'
4+
import { DocsPage } from 'next-docs-ui/page'
5+
import { findNeighbour } from 'next-docs-zeta/server'
6+
import { notFound } from 'next/navigation'
7+
8+
export default async function Page({
9+
params
10+
}: {
11+
params: { slug?: string[] }
12+
}) {
13+
const page = getPage(params.slug)
14+
15+
if (page == null) {
16+
notFound()
17+
}
18+
19+
const MDX = page.data.default
20+
const neighbour = findNeighbour(tree, getPageUrl(params.slug))
21+
22+
return (
23+
<DocsPage toc={page.data.toc} footer={neighbour}>
24+
<MDXContent>
25+
<h1>{page.matter.title}</h1>
26+
<MDX />
27+
</MDXContent>
28+
</DocsPage>
29+
)
30+
}
31+
32+
export async function generateStaticParams(): Promise<{ slug: string[] }[]> {
33+
return pages.map(page => ({
34+
slug: page.slugs
35+
}))
36+
}
37+
38+
export function generateMetadata({ params }: { params: { slug?: string[] } }) {
39+
const page = getPage(params.slug)
40+
41+
if (page == null) notFound()
42+
43+
return {
44+
title: page.matter.title,
45+
description: page.matter.description
46+
} satisfies Metadata
47+
}

app/docs/layout.tsx

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { DocsLayout } from 'next-docs-ui/layout'
2+
import type { ReactNode } from 'react'
3+
import { tree } from '../source'
4+
5+
export default function RootDocsLayout({ children }: { children: ReactNode }) {
6+
return (
7+
<DocsLayout tree={tree} nav={{ title: 'Topic Docs' }}>
8+
{children}
9+
</DocsLayout>
10+
)
11+
}

app/layout.tsx

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { RootProvider } from 'next-docs-ui/provider'
2+
import { Inter } from 'next/font/google'
3+
import type { ReactNode } from 'react'
4+
import 'next-docs-ui/style.css'
5+
6+
7+
const inter = Inter({
8+
subsets: ['latin']
9+
})
10+
11+
export default function Layout({ children }: { children: ReactNode }) {
12+
return (
13+
<html lang="en" className={inter.className}>
14+
<body>
15+
<RootProvider>{children}</RootProvider>
16+
</body>
17+
</html>
18+
)
19+
}

app/page.tsx

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
import React from 'react';
2+
3+
interface Props {
4+
// No additional props needed
5+
}
6+
7+
const WelcomeSection: React.FC<Props> = () => {
8+
return (
9+
<div style={{
10+
display: 'flex',
11+
flexDirection: 'column',
12+
alignItems: 'center',
13+
justifyContent: 'center',
14+
textAlign: 'center',
15+
padding: 40,
16+
borderRadius: '10px',
17+
background: '#000000', // Solid black background
18+
boxShadow: '0 0 20px rgba(255, 255, 255, 0.2)', // White glow effect
19+
color: '#ffffff', // Light text color
20+
fontFamily: 'Roboto, Arial, sans-serif', // Modern font
21+
}}>
22+
<h2>
23+
<img src="https://cdn.topiclist.xyz/images/png/TopicList5.png" alt="Futuristic Logo" style={{ width: 150, height: 150, borderRadius: '50%', objectFit: 'cover', border: '2px solid #00bfff' }} />
24+
</h2>
25+
26+
<p style={{ fontSize: '1.5em', margin: '20px 0', color: '#b8b8b8' }}>Welcome to Topic Docs!</p>
27+
<p style={{ marginBottom: '30px', fontSize: '1.2em', color: '#e0e0e0' }}>On this website, we will show you how to use our API on your services. We're here to help you use our site.</p>
28+
29+
<div style={{
30+
display: 'flex',
31+
justifyContent: 'center',
32+
gap: 20,
33+
}}>
34+
<a href="/docs/Developer/API/Intro" style={{ textDecoration: 'none' }}>
35+
<button style={{
36+
backgroundColor: '#00bfff', // Light blue
37+
color: '#000000', // Black text
38+
padding: '15px 30px',
39+
fontSize: '1.2em',
40+
border: 'none',
41+
borderRadius: '8px',
42+
cursor: 'pointer',
43+
boxShadow: '0 4px 12px rgba(0, 191, 255, 0.3)',
44+
transition: 'background-color 0.3s',
45+
fontFamily: 'Roboto, Arial, sans-serif', // Modern font
46+
}}>Explore Developer Stuff</button>
47+
</a>
48+
<a href="/docs/User/introduction/intro" style={{ textDecoration: 'none' }}>
49+
<button style={{
50+
backgroundColor: '#ff4500', // Orange
51+
color: '#000000', // Black text
52+
padding: '15px 30px',
53+
fontSize: '1.2em',
54+
border: 'none',
55+
borderRadius: '8px',
56+
cursor: 'pointer',
57+
boxShadow: '0 4px 12px rgba(255, 69, 0, 0.3)',
58+
transition: 'background-color 0.3s',
59+
fontFamily: 'Roboto, Arial, sans-serif', // Modern font
60+
}}>Discover Site Introduction</button>
61+
</a>
62+
</div>
63+
</div>
64+
);
65+
};
66+
67+
const App: React.FC = () => {
68+
return (
69+
<div style={{
70+
display: 'flex',
71+
flexDirection: 'column',
72+
alignItems: 'center',
73+
justifyContent: 'center',
74+
minHeight: '100vh',
75+
background: '#000000', // Solid black background
76+
}}>
77+
<WelcomeSection />
78+
</div>
79+
);
80+
};
81+
82+
export default App;

app/source.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { map } from '@/_map'
2+
import { fromMap } from 'next-docs-mdx/map'
3+
4+
export const { getPage, getPageUrl, pages, tree } = fromMap(map)

content/docs/Developer/API/Intro.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: API Introduction
3+
description: Hello there! This is a introduction to the DscInflux API!
4+
---
5+
6+
7+
Topic API is used for most of it's backend its like a mastermind of our cause!!! and can easily be reached at `api.topiclist..xyz` and for servers at `https://k02hrtapiv5j.topiclist.xyz/`. Its is basically a API used by Topic to manage it's main Services.
8+
9+
## Base URL
10+
11+
The Base URL that you will be using, to make requests with the API is `api.topiclist.xyz` and for servers at `https://k02hrtapiv5j.topiclist.xyz/`.
12+

content/docs/User/guide/guide.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Introduction
3+
description: Hello there! This is a introduction to Topic!
4+
Icon: BookIcon
5+
---
6+
7+
This page will give a full guide on how to use our varies service such as our Server and Bot List.
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Introduction
3+
description: Hello there! This is a introduction to Topic!
4+
Icon: BookIcon
5+
---
6+
7+
8+
Topic List, a platform used to list different variety of things.
9+
10+
## Safe URLS
11+
12+
The URLs that we use at Topic such as `*.topiclist.xyz` is the only and safest to use and work with. Other than that we, don't have any other Domain we operate upon so if you find some strange link that is similar or look-a-like of influx and further goes onto stealing your stuff we are not responsible for it.
13+
14+

mdx-components.tsx

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import type { MDXComponents } from 'mdx/types'
2+
import defaultComponents from 'next-docs-ui/mdx-server'
3+
4+
export function useMDXComponents(components: MDXComponents): MDXComponents {
5+
return {
6+
...defaultComponents,
7+
Image: p => <defaultComponents.img {...p} />,
8+
...components
9+
}
10+
}

next-env.d.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.

next.config.js

-6
This file was deleted.

next.config.mjs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import createNextDocsMDX from 'next-docs-mdx/config'
2+
3+
const withFumaMDX = createNextDocsMDX()
4+
5+
/** @type {import('next').NextConfig} */
6+
const config = {
7+
reactStrictMode: true
8+
}
9+
10+
export default withFumaMDX(config)

0 commit comments

Comments
 (0)