Skip to content

Commit 1b9d49f

Browse files
committed
why no work again????
1 parent 7c3380f commit 1b9d49f

File tree

7 files changed

+16
-9
lines changed

7 files changed

+16
-9
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ aaa
1313
a
1414
yes
1515
soon
16-
website
16+
website
17+
test*

packages/cli/src/templates/ts/doxium-config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export default {
2626
toggleFolders: false, // Beware! Experimental feature
2727
separate: false,
2828
appName: 'Doxium',
29+
appDescription: 'A documentation system for Next.js',
2930
showAppNameInTitle: true,
3031
scollHeightBreakpoint: 300,
3132
showEditInGithub: true,

packages/cli/src/templates/ts/types.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ export interface DoxiumConfig {
108108
};
109109
misc: {
110110
toggleFolders: boolean; // Experimental: Folder collapse feature
111-
appName: string;
111+
appName?: string;
112+
appDescription?: string;
112113
showAppNameInTitle: boolean;
113114
separate: boolean;
114115
scollHeightBreakpoint: number;

packages/cli/src/templates/tsx/docs-[slug]-page.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import rehypeMdxCodeProps from 'rehype-mdx-code-props';
1616
import remarkGfm from 'remark-gfm';
1717
import remarkMath from 'remark-math';
1818

19+
const colorScheme = config.style.colorScheme;
20+
1921
export const generateStaticParams = async () => {
2022
try {
2123
const files = await getAllMdxSlugs();
@@ -46,8 +48,6 @@ export const generateMetadata = async ({ params }: { params: params }) => {
4648
};
4749
};
4850

49-
const colorScheme = config.style.colorScheme;
50-
5151
const Page = async ({ params }: { params: params }) => {
5252
try {
5353
const slug = (await params).slug?.join('/') || 'index';

packages/cli/src/templates/tsx/docs-layout.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ import './globals.css';
88

99
const inter = Inter({ subsets: ['latin'] });
1010
const colorScheme = config.style.colorScheme;
11+
const appName = config.misc.appName;
12+
const appDescription = config.misc.appDescription;
1113

1214
export const metadata: Metadata = {
13-
title: 'Doxium app',
14-
description: 'New doxium app generated by create-doxium-app',
15+
title: appName ?? 'Doxium app',
16+
description: appDescription ?? 'New doxium app generated by @doxium/cli',
1517
};
1618

1719
const RootLayout = async ({

packages/cli/src/templates/tsx/docs-page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @ts-nocheck
22

3-
import { Button } from '@doxium/ui';
43
import { FiChevronRight } from '@vertisanpro/react-icons/fi';
4+
import { Button } from 'doxium/components/button';
55
import Link from 'next/link';
66

77
const Home = () => {

packages/cli/src/templates/tsx/no-docs-layout.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ import './globals.css';
1313

1414
const inter = Inter({ subsets: ['latin'] });
1515
const colorScheme = config.style.colorScheme;
16+
const appName = config.misc.appName;
17+
const appDescription = config.misc.appDescription;
1618

1719
export const metadata: Metadata = {
18-
title: 'Doxium app',
19-
description: 'New doxium app generated by create-doxium-app',
20+
title: appName ?? 'Doxium app',
21+
description: appDescription ?? 'New doxium app generated by @doxium/cli',
2022
};
2123

2224
const RootLayout = async ({

0 commit comments

Comments
 (0)