Skip to content

Commit 8165a92

Browse files
committed
chore: restructure project configuration and update documentation files
1 parent 6360ca9 commit 8165a92

File tree

16 files changed

+96
-85
lines changed

16 files changed

+96
-85
lines changed
File renamed without changes.

packages/cli/CHANGELOG.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@objectdocs/cli",
3-
"version": "0.1.0",
3+
"version": "0.0.1",
44
"type": "module",
55
"bin": {
66
"objectdocs": "./bin/cli.mjs"

packages/cli/src/commands/build.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ export function registerBuildCommand(cli) {
2525
}
2626

2727
// Copy user config and assets to nextAppDir
28-
const userConfigPath = path.resolve(process.cwd(), 'objectdocs.json');
28+
const userConfigPath = path.resolve(process.cwd(), 'content/docs.site.json');
2929
if (fs.existsSync(userConfigPath)) {
3030
console.log(` Copying config from ${userConfigPath}`);
31-
fs.cpSync(userConfigPath, path.join(nextAppDir, 'objectdocs.json'));
31+
fs.cpSync(userConfigPath, path.join(nextAppDir, 'docs.site.json'));
3232
}
3333

3434
const userPublicPath = path.resolve(process.cwd(), 'public');

packages/cli/src/commands/dev.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ export function registerDevCommand(cli) {
4444

4545
const startServer = () => {
4646
// Sync config and assets before starting
47-
const userConfigPath = path.resolve(process.cwd(), 'objectdocs.json');
47+
const userConfigPath = path.resolve(process.cwd(), 'content/docs.site.json');
4848
if (fs.existsSync(userConfigPath)) {
49-
fs.cpSync(userConfigPath, path.join(nextAppDir, 'objectdocs.json'));
49+
fs.cpSync(userConfigPath, path.join(nextAppDir, 'docs.site.json'));
5050
}
5151

5252
const userPublicPath = path.resolve(process.cwd(), 'public');
@@ -79,7 +79,7 @@ export function registerDevCommand(cli) {
7979
startServer();
8080

8181
// Watch for config changes
82-
const configFile = path.resolve(process.cwd(), 'objectdocs.json');
82+
const configFile = path.resolve(process.cwd(), 'content/docs.site.json');
8383
if (fs.existsSync(configFile)) {
8484
console.log(`Watching config: ${configFile}`);
8585
fs.watch(configFile, (eventType) => {

packages/cli/src/commands/start.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function registerStartCommand(cli) {
2222
// 2. Check config
2323
let isStatic = false;
2424
try {
25-
const configPath = path.resolve(process.cwd(), 'objectdocs.json');
25+
const configPath = path.resolve(process.cwd(), 'content/docs.site.json');
2626
if (fs.existsSync(configPath)) {
2727
const config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
2828
if (config.build?.output === 'export') {

packages/site/CHANGELOG.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

packages/site/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This package provides the actual Next.js application structure, configuration, a
88

99
## Tech Stack
1010

11-
- **Framework**: Next.js 16 (App Router)
11+
- **Concepts**: Next.js 16 (App Router)
1212
- **Documentation**: Fumadocs
1313
- **Styling**: Tailwind CSS
1414
- **Deployment**: Static Export (`output: 'export'`)

packages/site/app/[lang]/docs/[[...slug]]/page.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ import type { Metadata } from 'next';
33
import { DocsPage, DocsBody } from 'fumadocs-ui/page';
44
import { notFound } from 'next/navigation';
55
import { siteConfig } from '@/lib/site-config';
6-
import defaultComponents from 'fumadocs-ui/mdx';
7-
import { Steps, Step } from 'fumadocs-ui/components/steps';
8-
import { Card, Cards } from 'fumadocs-ui/components/card';
9-
import { Callout } from 'fumadocs-ui/components/callout';
106

117
interface PageProps {
128
params: Promise<{
@@ -43,7 +39,7 @@ export default async function Page({ params }: PageProps) {
4339
} : undefined}
4440
>
4541
<DocsBody>
46-
<MDX components={{ ...defaultComponents, Steps, Step, Card, Cards, Callout }} />
42+
<MDX />
4743
</DocsBody>
4844
</DocsPage>
4945
);

packages/site/app/[lang]/layout.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ const { provider } = defineI18nUI(i18n, {
1010
displayName: 'English',
1111
},
1212
cn: {
13-
displayName: 'Chinese',
14-
toc: '目錄',
15-
search: '搜尋文檔',
16-
lastUpdate: '最後更新於',
17-
searchNoResult: '沒有結果',
18-
previousPage: '上一頁',
19-
nextPage: '下一頁',
20-
chooseLanguage: '選擇語言',
13+
displayName: '简体中文',
14+
toc: '目录',
15+
search: '搜索文档',
16+
lastUpdate: '最后更新于',
17+
searchNoResult: '没有结果',
18+
previousPage: '上一页',
19+
nextPage: '下一页',
20+
chooseLanguage: '选择语言',
2121
},
2222
},
2323
});

0 commit comments

Comments
 (0)