Skip to content

Commit 5cead41

Browse files
committed
test: add docusaurus website
1 parent 1ac2f35 commit 5cead41

File tree

17 files changed

+14504
-5555
lines changed

17 files changed

+14504
-5555
lines changed

apps/website/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# API reference intro

apps/website/docs/guide/intro.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# Guide intro

apps/website/docusaurus.config.ts

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
import { themes as prismThemes } from 'prism-react-renderer';
2+
import type { Config } from '@docusaurus/types';
3+
import type * as Preset from '@docusaurus/preset-classic';
4+
5+
const config: Config = {
6+
title: 'CommandKit',
7+
tagline: 'A Discord.js handler',
8+
favicon: 'img/favicon.ico',
9+
url: 'https://commandkit.dev',
10+
baseUrl: '/',
11+
onBrokenLinks: 'throw',
12+
onBrokenMarkdownLinks: 'warn',
13+
i18n: {
14+
defaultLocale: 'en',
15+
locales: ['en'],
16+
},
17+
presets: [
18+
[
19+
'classic',
20+
{
21+
docs: {
22+
sidebarPath: './sidebars.ts',
23+
editUrl:
24+
'https://github.com/underctrl-io/commandkit/tree/main/apps/website/',
25+
},
26+
theme: {
27+
customCss: './src/css/custom.css',
28+
},
29+
} satisfies Preset.Options,
30+
],
31+
],
32+
themeConfig: {
33+
image: 'img/docusaurus-social-card.jpg',
34+
navbar: {
35+
title: 'CommandKit',
36+
logo: {
37+
alt: 'CommandKit logo',
38+
src: 'img/logo_128.png',
39+
},
40+
items: [
41+
{
42+
type: 'docSidebar',
43+
sidebarId: 'guide',
44+
position: 'left',
45+
label: 'Guide',
46+
},
47+
{
48+
type: 'docSidebar',
49+
sidebarId: 'api',
50+
position: 'left',
51+
label: 'API Reference',
52+
},
53+
{
54+
type: 'docsVersionDropdown',
55+
position: 'right',
56+
},
57+
{
58+
href: 'https://github.com/underctrl-io/commandkit',
59+
label: 'GitHub',
60+
position: 'right',
61+
},
62+
{
63+
href: 'https://ctrl.lol/discord',
64+
label: 'Discord',
65+
position: 'right',
66+
},
67+
],
68+
},
69+
footer: {
70+
style: 'light',
71+
copyright: `Copyright © ${new Date().getFullYear()} CommandKit`,
72+
},
73+
prism: {
74+
theme: prismThemes.github,
75+
darkTheme: prismThemes.dracula,
76+
},
77+
} satisfies Preset.ThemeConfig,
78+
};
79+
80+
export default config;

apps/website/package.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "website",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"docusaurus": "docusaurus",
7+
"start": "docusaurus start",
8+
"build": "docusaurus build",
9+
"swizzle": "docusaurus swizzle",
10+
"deploy": "docusaurus deploy",
11+
"clear": "docusaurus clear",
12+
"serve": "docusaurus serve",
13+
"write-translations": "docusaurus write-translations",
14+
"write-heading-ids": "docusaurus write-heading-ids",
15+
"typecheck": "tsc"
16+
},
17+
"dependencies": {
18+
"@docusaurus/core": "3.6.3",
19+
"@docusaurus/preset-classic": "3.6.3",
20+
"@mdx-js/react": "^3.0.0",
21+
"clsx": "^2.0.0",
22+
"prism-react-renderer": "^2.3.0",
23+
"react": "^18.0.0",
24+
"react-dom": "^18.0.0"
25+
},
26+
"devDependencies": {
27+
"@docusaurus/module-type-aliases": "3.6.3",
28+
"@docusaurus/tsconfig": "3.6.3",
29+
"@docusaurus/types": "3.6.3",
30+
"typescript": "~5.6.2"
31+
},
32+
"browserslist": {
33+
"production": [
34+
">0.5%",
35+
"not dead",
36+
"not op_mini all"
37+
],
38+
"development": [
39+
"last 3 chrome version",
40+
"last 3 firefox version",
41+
"last 5 safari version"
42+
]
43+
},
44+
"engines": {
45+
"node": ">=18.0"
46+
}
47+
}

apps/website/sidebars.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';
2+
3+
const sidebars: SidebarsConfig = {
4+
guide: [
5+
{
6+
type: 'autogenerated',
7+
dirName: 'guide',
8+
},
9+
],
10+
api: [
11+
{
12+
type: 'autogenerated',
13+
dirName: 'api-reference',
14+
},
15+
],
16+
};
17+
18+
export default sidebars;

apps/website/src/css/custom.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* Any CSS included here will be global. The classic template
3+
* bundles Infima by default. Infima is a CSS framework designed to
4+
* work well for content-centric websites.
5+
*/
6+
7+
/* You can override the default Infima variables here. */
8+
:root {
9+
--ifm-color-primary: #2e8555;
10+
--ifm-color-primary-dark: #29784c;
11+
--ifm-color-primary-darker: #277148;
12+
--ifm-color-primary-darkest: #205d3b;
13+
--ifm-color-primary-light: #33925d;
14+
--ifm-color-primary-lighter: #359962;
15+
--ifm-color-primary-lightest: #3cad6e;
16+
--ifm-code-font-size: 95%;
17+
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
18+
}
19+
20+
/* For readability concerns, you should choose a lighter palette in dark mode. */
21+
[data-theme='dark'] {
22+
--ifm-color-primary: #25c2a0;
23+
--ifm-color-primary-dark: #21af90;
24+
--ifm-color-primary-darker: #1fa588;
25+
--ifm-color-primary-darkest: #1a8870;
26+
--ifm-color-primary-light: #29d5b0;
27+
--ifm-color-primary-lighter: #32d8b4;
28+
--ifm-color-primary-lightest: #4fddbf;
29+
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
30+
}

apps/website/src/pages/index.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import Layout from '@theme/Layout';
2+
3+
export default function Home(): React.JSX.Element {
4+
return (
5+
<Layout>
6+
<main>
7+
<div>Home page</div>
8+
</main>
9+
</Layout>
10+
);
11+
}
9.81 KB
Loading

apps/website/static/img/ckit_logo.svg

Lines changed: 10 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)