@windrun-huaiin/diaomao 31.1.3 → 31.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env.local.txt CHANGED
@@ -13,12 +13,12 @@ NEXT_PUBLIC_BASE_URL=http://localhost:3000
13
13
 
14
14
  ## Github
15
15
  NEXT_PUBLIC_GITHUB=https://github.com/YOURS_/YOURS_/
16
- NEXT_PUBLIC_GITHUB_BASE_URL=https://github.com/YOURS_/YOURS_/main
16
+ NEXT_PUBLIC_GITHUB_BASE_URL=https://github.com/YOURS_/YOURS_/blob/main
17
17
 
18
18
 
19
19
  ## Website Theme Switch Mode
20
20
  ## light-only, dark-only, light-dark-system
21
- NEXT_PUBLIC_STYLE_THEME_MODE=light-dark-only
21
+ NEXT_PUBLIC_STYLE_THEME_MODE=light-dark-system
22
22
 
23
23
  ## Website Theme Color config
24
24
  ## purple:#AC62FD , orange:#F97316, indigo:#6366F1, emerald:#48C892, rose:#F43F5E
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windrun-huaiin/diaomao",
3
- "version": "31.1.3",
3
+ "version": "31.2.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -21,8 +21,8 @@
21
21
  "@windrun-huaiin/base-ui": "31.0.0",
22
22
  "@windrun-huaiin/contracts": "31.0.0",
23
23
  "@windrun-huaiin/fumadocs-local-md": "31.0.0",
24
- "@windrun-huaiin/lib": "31.0.1",
25
- "@windrun-huaiin/third-ui": "31.2.0",
24
+ "@windrun-huaiin/lib": "31.0.2",
25
+ "@windrun-huaiin/third-ui": "31.3.1",
26
26
  "clsx": "^2.1.1",
27
27
  "lucide-react": "^0.577.0",
28
28
  "next": "16.1.6",
@@ -8,7 +8,6 @@ const { Page, generateStaticParams, generateMetadata } = createFumaPage({
8
8
  sourceKey: sourceKey,
9
9
  mdxContentSource: () => siteDocs.getContentSource(sourceKey),
10
10
  getMDXComponents: siteDocs.getMDXComponents,
11
- mdxSourceDir: appConfig.mdxSourceDir[sourceKey],
12
11
  githubBaseUrl: appConfig.githubBaseUrl,
13
12
  copyButtonComponent: <LLMCopyButton />,
14
13
  showBreadcrumb: false,
@@ -7,7 +7,6 @@ const { Page, generateStaticParams, generateMetadata } = createFumaPage({
7
7
  sourceKey: sourceKey,
8
8
  mdxContentSource: () => siteDocs.getContentSource(sourceKey),
9
9
  getMDXComponents: siteDocs.getMDXComponents,
10
- mdxSourceDir: appConfig.mdxSourceDir[sourceKey],
11
10
  githubBaseUrl: appConfig.githubBaseUrl,
12
11
  supportedLocales: appConfig.i18n.locales as string[],
13
12
  showBreadcrumb: false,
@@ -2,18 +2,21 @@
2
2
 
3
3
  import { type NextRequest, NextResponse } from 'next/server';
4
4
 
5
- import { siteDocs } from '@/lib/site-docs';
6
5
  import { appConfig } from '@/lib/appConfig';
6
+ import { resolveMdxSourceDir } from '@/lib/mdx-source';
7
+ import { siteDocs } from '@/lib/site-docs';
7
8
  import { LLMCopyHandler } from '@windrun-huaiin/third-ui/fuma/server/llm-copy-handler';
8
9
 
10
+ const sourceKey = 'blog';
11
+
9
12
  export async function GET(request: NextRequest) {
10
13
  const searchParams = request.nextUrl.searchParams;
11
14
  const locale = searchParams.get('locale') ?? appConfig.i18n.defaultLocale;
12
15
  const requestedPath = searchParams.get('path') || '';
13
- const blogSource = await siteDocs.getContentSource('blog');
16
+ const blogSource = await siteDocs.getContentSource(sourceKey);
14
17
 
15
18
  const result = await LLMCopyHandler({
16
- sourceDir: appConfig.mdxSourceDir.blog,
19
+ sourceDir: resolveMdxSourceDir(sourceKey),
17
20
  dataSource: blogSource,
18
21
  requestedPath,
19
22
  locale,
@@ -2,18 +2,20 @@
2
2
 
3
3
  import { type NextRequest, NextResponse } from 'next/server';
4
4
 
5
- import { siteDocs } from '@/lib/site-docs';
6
5
  import { appConfig } from '@/lib/appConfig';
6
+ import { resolveMdxSourceDir } from '@/lib/mdx-source';
7
+ import { siteDocs } from '@/lib/site-docs';
7
8
  import { LLMCopyHandler } from '@windrun-huaiin/third-ui/fuma/server/llm-copy-handler';
8
9
 
10
+ const sourceKey = 'legal';
9
11
  export async function GET(request: NextRequest) {
10
12
  const searchParams = request.nextUrl.searchParams;
11
13
  const locale = searchParams.get('locale') ?? appConfig.i18n.defaultLocale;
12
14
  const requestedPath = searchParams.get('path') || '';
13
- const legalSource = await siteDocs.getContentSource('legal');
15
+ const legalSource = await siteDocs.getContentSource(sourceKey);
14
16
 
15
17
  const result = await LLMCopyHandler({
16
- sourceDir: appConfig.mdxSourceDir.legal,
18
+ sourceDir: resolveMdxSourceDir(sourceKey),
17
19
  dataSource: legalSource,
18
20
  requestedPath,
19
21
  locale,
@@ -1,8 +1,9 @@
1
1
  import { appConfig } from '@/lib/appConfig';
2
+ import { resolveMdxSourceDir } from "@/lib/mdx-source";
2
3
  import { createSitemapHandler } from '@windrun-huaiin/third-ui/lib/server';
3
4
 
4
5
  export default createSitemapHandler(
5
6
  appConfig.baseUrl,
6
7
  appConfig.i18n.locales as string[],
7
- appConfig.mdxSourceDir.blog
8
+ resolveMdxSourceDir('blog'),
8
9
  );
@@ -0,0 +1,3 @@
1
+ export function resolveMdxSourceDir(sourceKey: string) {
2
+ return `src/mdx/${sourceKey}`;
3
+ }