@farming-labs/docs 0.0.2-beta.1 → 0.0.2-beta.2
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/dist/cli/index.mjs +1 -1
- package/dist/index.d.mts +61 -1
- package/dist/index.mjs +1 -0
- package/package.json +2 -2
package/dist/cli/index.mjs
CHANGED
|
@@ -587,7 +587,7 @@ function printHelp() {
|
|
|
587
587
|
${pc.bold("@farming-labs/docs")} — Documentation framework CLI
|
|
588
588
|
|
|
589
589
|
${pc.dim("Usage:")}
|
|
590
|
-
farming-docs ${pc.cyan("<command>")}
|
|
590
|
+
npx @farming-labs/docs ${pc.cyan("<command>")}
|
|
591
591
|
|
|
592
592
|
${pc.dim("Commands:")}
|
|
593
593
|
${pc.cyan("init")} Scaffold docs in your project (default)
|
package/dist/index.d.mts
CHANGED
|
@@ -405,11 +405,71 @@ interface PageActionsConfig {
|
|
|
405
405
|
*/
|
|
406
406
|
position?: "above-title" | "below-title";
|
|
407
407
|
}
|
|
408
|
+
/**
|
|
409
|
+
* GitHub repository configuration for "Edit on GitHub" links
|
|
410
|
+
* and source file references.
|
|
411
|
+
*
|
|
412
|
+
* @example
|
|
413
|
+
* ```ts
|
|
414
|
+
* // Simple repo (not a monorepo)
|
|
415
|
+
* github: {
|
|
416
|
+
* url: "https://github.com/Kinfe123/my-docs",
|
|
417
|
+
* }
|
|
418
|
+
*
|
|
419
|
+
* // Monorepo — docs site lives in "website/" subdirectory
|
|
420
|
+
* github: {
|
|
421
|
+
* url: "https://github.com/farming-labs/docs",
|
|
422
|
+
* directory: "website",
|
|
423
|
+
* branch: "main",
|
|
424
|
+
* }
|
|
425
|
+
* ```
|
|
426
|
+
*
|
|
427
|
+
* Or as a simple string (branch defaults to "main", no directory prefix):
|
|
428
|
+
* ```ts
|
|
429
|
+
* github: "https://github.com/Kinfe123/my-docs"
|
|
430
|
+
* ```
|
|
431
|
+
*/
|
|
432
|
+
interface GithubConfig {
|
|
433
|
+
/** Repository URL (e.g. "https://github.com/farming-labs/docs") */
|
|
434
|
+
url: string;
|
|
435
|
+
/** Branch name. @default "main" */
|
|
436
|
+
branch?: string;
|
|
437
|
+
/**
|
|
438
|
+
* Subdirectory inside the repo where the docs site lives.
|
|
439
|
+
* Use this for monorepos where the docs app is not at the repo root.
|
|
440
|
+
*
|
|
441
|
+
* @example "website" → links point to `website/app/docs/…/page.mdx`
|
|
442
|
+
*/
|
|
443
|
+
directory?: string;
|
|
444
|
+
}
|
|
408
445
|
interface DocsConfig {
|
|
409
446
|
/** Entry folder for docs (e.g. "docs" → /docs) */
|
|
410
447
|
entry: string;
|
|
411
448
|
/** Theme configuration - single source of truth for UI */
|
|
412
449
|
theme?: DocsTheme;
|
|
450
|
+
/**
|
|
451
|
+
* GitHub repository URL or config. Enables "Edit on GitHub" links
|
|
452
|
+
* on each docs page footer, pointing to the source `.mdx` file.
|
|
453
|
+
*
|
|
454
|
+
* @example
|
|
455
|
+
* ```ts
|
|
456
|
+
* // Simple — branch defaults to "main"
|
|
457
|
+
* github: "https://github.com/Kinfe123/my-docs"
|
|
458
|
+
*
|
|
459
|
+
* // Monorepo — docs site lives in "website/" subdirectory
|
|
460
|
+
* github: {
|
|
461
|
+
* url: "https://github.com/farming-labs/docs",
|
|
462
|
+
* directory: "website",
|
|
463
|
+
* }
|
|
464
|
+
*
|
|
465
|
+
* // Custom branch
|
|
466
|
+
* github: {
|
|
467
|
+
* url: "https://github.com/Kinfe123/my-docs",
|
|
468
|
+
* branch: "develop",
|
|
469
|
+
* }
|
|
470
|
+
* ```
|
|
471
|
+
*/
|
|
472
|
+
github?: string | GithubConfig;
|
|
413
473
|
/**
|
|
414
474
|
* Sidebar navigation header.
|
|
415
475
|
* Customise the title shown at the top of the sidebar.
|
|
@@ -594,4 +654,4 @@ declare function resolveTitle(pageTitle: string, metadata?: DocsMetadata): strin
|
|
|
594
654
|
*/
|
|
595
655
|
declare function resolveOGImage(page: PageFrontmatter, ogConfig?: OGConfig, baseUrl?: string): string | undefined;
|
|
596
656
|
//#endregion
|
|
597
|
-
export { type BreadcrumbConfig, type CopyMarkdownConfig, type DocsConfig, type DocsMetadata, type DocsNav, type DocsTheme, type FontStyle, type OGConfig, type OpenDocsConfig, type OpenDocsProvider, type PageActionsConfig, type PageFrontmatter, type SidebarConfig, type ThemeToggleConfig, type TypographyConfig, type UIConfig, createTheme, deepMerge, defineDocs, extendTheme, resolveOGImage, resolveTitle };
|
|
657
|
+
export { type BreadcrumbConfig, type CopyMarkdownConfig, type DocsConfig, type DocsMetadata, type DocsNav, type DocsTheme, type FontStyle, type GithubConfig, type OGConfig, type OpenDocsConfig, type OpenDocsProvider, type PageActionsConfig, type PageFrontmatter, type SidebarConfig, type ThemeToggleConfig, type TypographyConfig, type UIConfig, createTheme, deepMerge, defineDocs, extendTheme, resolveOGImage, resolveTitle };
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/docs",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.2",
|
|
4
4
|
"description": "Modern, flexible MDX-based docs framework — core types, config, and CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"bin": {
|
|
17
|
-
"
|
|
17
|
+
"docs": "./dist/cli/index.mjs"
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"dist"
|