blodemd 0.0.11 → 0.0.13
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/README.md +11 -47
- package/dev-server/app/layout.tsx +1 -1
- package/dev-server/next.config.js +19 -9
- package/dev-server/tsconfig.json +0 -3
- package/dist/cli.mjs +732 -123
- package/dist/cli.mjs.map +1 -1
- package/docs/app/globals.css +15 -1
- package/docs/components/api/api-playground.tsx +2 -2
- package/docs/components/docs/copy-page-menu.tsx +55 -27
- package/docs/components/docs/doc-header.tsx +1 -1
- package/docs/components/docs/doc-shell.tsx +89 -88
- package/docs/components/docs/doc-sidebar.tsx +6 -3
- package/docs/components/docs/doc-toc.tsx +1 -1
- package/docs/components/docs/mobile-nav.tsx +8 -16
- package/docs/components/docs/sidebar-scroll-area.tsx +58 -0
- package/docs/components/git/repo-picker.tsx +526 -0
- package/docs/components/mdx/agent-instructions.tsx +17 -0
- package/docs/components/mdx/code-block.tsx +6 -1
- package/docs/components/mdx/code-group.tsx +1 -1
- package/docs/components/mdx/iframe.tsx +62 -0
- package/docs/components/mdx/index.tsx +4 -0
- package/docs/components/mdx/tabs.tsx +5 -5
- package/docs/components/mdx/video.tsx +45 -12
- package/docs/components/third-parties.tsx +29 -0
- package/docs/components/ui/badge.tsx +61 -0
- package/docs/components/ui/breadcrumb.tsx +61 -41
- package/docs/components/ui/button-group.tsx +83 -0
- package/docs/components/ui/button.tsx +30 -55
- package/docs/components/ui/command.tsx +32 -4
- package/docs/components/ui/copy-button.tsx +12 -19
- package/docs/components/ui/dialog.tsx +50 -1
- package/docs/components/ui/input.tsx +16 -97
- package/docs/components/ui/kbd.tsx +98 -0
- package/docs/components/ui/morph-icon.tsx +79 -0
- package/docs/components/ui/popover.tsx +225 -30
- package/docs/components/ui/search.tsx +0 -9
- package/docs/components/ui/sheet.tsx +30 -1
- package/docs/components/ui/sidebar.tsx +332 -7
- package/docs/components/ui/site-footer.tsx +6 -4
- package/docs/components/ui/skeleton.tsx +11 -0
- package/docs/components/ui/switch.tsx +32 -0
- package/docs/components/ui/tabs.tsx +138 -0
- package/docs/lib/api-client.ts +72 -0
- package/docs/lib/contextual-options.ts +9 -0
- package/docs/lib/dashboard-session.ts +167 -0
- package/docs/lib/db.ts +13 -0
- package/docs/lib/env.ts +4 -3
- package/docs/lib/etag.ts +22 -0
- package/docs/lib/github-install.ts +33 -0
- package/docs/lib/project-authz.ts +46 -0
- package/docs/lib/routes.ts +5 -1
- package/docs/lib/supabase.ts +30 -6
- package/docs/lib/tenancy.ts +1 -0
- package/docs/lib/tenant-static.ts +206 -4
- package/docs/lib/tenants.ts +5 -1
- package/docs/lib/time-ago.ts +24 -0
- package/docs/lib/use-tab-observer.ts +71 -0
- package/package.json +3 -1
- package/packages/@repo/common/package.json +2 -2
- package/packages/@repo/contracts/dist/git.d.ts +28 -0
- package/packages/@repo/contracts/dist/git.d.ts.map +1 -0
- package/packages/@repo/contracts/dist/git.js +24 -0
- package/packages/@repo/contracts/dist/index.d.ts +1 -1
- package/packages/@repo/contracts/dist/index.d.ts.map +1 -1
- package/packages/@repo/contracts/dist/index.js +1 -1
- package/packages/@repo/contracts/package.json +2 -2
- package/packages/@repo/contracts/src/git.ts +31 -0
- package/packages/@repo/contracts/src/index.ts +1 -1
- package/packages/@repo/models/dist/docs-config.d.ts +6 -0
- package/packages/@repo/models/dist/docs-config.d.ts.map +1 -1
- package/packages/@repo/models/dist/docs-config.js +1 -0
- package/packages/@repo/models/package.json +2 -2
- package/packages/@repo/models/src/docs-config.ts +1 -0
- package/packages/@repo/prebuild/package.json +2 -2
- package/packages/@repo/previewing/dist/index.d.ts +3 -0
- package/packages/@repo/previewing/dist/index.d.ts.map +1 -1
- package/packages/@repo/previewing/dist/index.js +48 -0
- package/packages/@repo/previewing/package.json +2 -2
- package/packages/@repo/previewing/src/index.ts +56 -0
- package/packages/@repo/validation/package.json +2 -2
- package/packages/@repo/validation/src/blodemd-docs-schema.json +1 -0
- package/scripts/prepare-package.mjs +14 -0
- package/packages/@repo/contracts/dist/api-key.d.ts +0 -30
- package/packages/@repo/contracts/dist/api-key.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/api-key.js +0 -20
- package/packages/@repo/contracts/src/api-key.ts +0 -27
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **One-command deploy:** Push your entire docs folder to Blode.md with `blodemd push`.
|
|
10
10
|
- **Scaffold in seconds:** Generate a ready-to-edit docs folder with `blodemd new`.
|
|
11
11
|
- **Config validation:** Catch `docs.json` errors before deploying.
|
|
12
|
-
- **
|
|
12
|
+
- **Zero keys:** Sign in once with GitHub in your browser — the CLI handles the rest.
|
|
13
13
|
|
|
14
14
|
## Install
|
|
15
15
|
|
|
@@ -28,30 +28,16 @@ Requires Node.js 20.17+.
|
|
|
28
28
|
## Quick Start
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
+
# Sign in with GitHub (opens your browser)
|
|
32
|
+
blodemd login
|
|
33
|
+
|
|
31
34
|
# Create a new docs site
|
|
32
|
-
# Empty directories scaffold in place.
|
|
33
|
-
# Non-empty directories get a Mint-style safety prompt.
|
|
34
35
|
blodemd new
|
|
35
36
|
|
|
36
|
-
# Skip prompts and use defaults
|
|
37
|
-
blodemd new --yes
|
|
38
|
-
|
|
39
|
-
# Scaffold the current directory explicitly
|
|
40
|
-
blodemd new .
|
|
41
|
-
|
|
42
|
-
# Set the project slug explicitly
|
|
43
|
-
blodemd new --name acme-docs
|
|
44
|
-
|
|
45
|
-
# Create the richer starter template
|
|
46
|
-
blodemd new --template starter
|
|
47
|
-
|
|
48
37
|
# Preview locally
|
|
49
38
|
blodemd dev
|
|
50
39
|
|
|
51
|
-
#
|
|
52
|
-
blodemd login
|
|
53
|
-
|
|
54
|
-
# Deploy your docs
|
|
40
|
+
# Deploy
|
|
55
41
|
blodemd push
|
|
56
42
|
```
|
|
57
43
|
|
|
@@ -59,7 +45,7 @@ blodemd push
|
|
|
59
45
|
|
|
60
46
|
```bash
|
|
61
47
|
blodemd new [directory] Create a new blode.md documentation site
|
|
62
|
-
blodemd login
|
|
48
|
+
blodemd login Sign in with GitHub in your browser
|
|
63
49
|
blodemd logout Remove stored credentials
|
|
64
50
|
blodemd whoami Show current authentication
|
|
65
51
|
blodemd validate [dir] Validate docs.json
|
|
@@ -72,16 +58,11 @@ blodemd dev [dir] Start the local docs preview server
|
|
|
72
58
|
```
|
|
73
59
|
--project <slug> Project slug (env: BLODEMD_PROJECT)
|
|
74
60
|
--api-url <url> API URL (env: BLODEMD_API_URL)
|
|
75
|
-
--api-key <token> API key (env: BLODEMD_API_KEY)
|
|
76
61
|
--branch <name> Git branch (env: BLODEMD_BRANCH)
|
|
77
62
|
--message <msg> Deploy message (env: BLODEMD_COMMIT_MESSAGE)
|
|
78
63
|
```
|
|
79
64
|
|
|
80
|
-
The CLI reads the project slug from the `
|
|
81
|
-
|
|
82
|
-
Interactive `blodemd new` inspects the current directory first. In an empty directory it scaffolds there and prompts for the project slug. In a non-empty directory it offers a Mint-style choice between creating a `docs/` subdirectory and scaffolding the current directory. Non-interactive runs fall back to `docs/`, and `--yes` accepts those defaults without prompting.
|
|
83
|
-
|
|
84
|
-
Use `blodemd new --template starter` when you want the full starter layout with a repo README, `.gitignore`, `CLAUDE.md`, `AGENTS.md` as a symlink or pointer, SVG branding assets, and example content. The default `blodemd new` scaffold stays minimal and only writes `docs.json` plus `index.mdx`. The command stops with an error if the target directory already contains scaffolded files.
|
|
65
|
+
The CLI reads the project slug from the `slug` field in `docs.json` when `--project` is not set.
|
|
85
66
|
|
|
86
67
|
### `dev` Options
|
|
87
68
|
|
|
@@ -91,16 +72,9 @@ Use `blodemd new --template starter` when you want the full starter layout with
|
|
|
91
72
|
--no-open Don't open the browser automatically
|
|
92
73
|
```
|
|
93
74
|
|
|
94
|
-
##
|
|
75
|
+
## Auto-deploy without the CLI
|
|
95
76
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
```yaml
|
|
99
|
-
- uses: mblode/blodemd/packages/deploy-action@main
|
|
100
|
-
with:
|
|
101
|
-
api-key: ${{ secrets.BLODEMD_API_KEY }}
|
|
102
|
-
directory: docs
|
|
103
|
-
```
|
|
77
|
+
Install the **Blode.md GitHub App** from your project's Git tab in the dashboard. Pushes to your configured branch deploy automatically — no CLI, no tokens, no workflows.
|
|
104
78
|
|
|
105
79
|
## Configuration
|
|
106
80
|
|
|
@@ -109,23 +83,13 @@ The CLI looks for a `docs.json` file in the docs directory. Minimal example:
|
|
|
109
83
|
```json
|
|
110
84
|
{
|
|
111
85
|
"$schema": "https://blode.md/docs.json",
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"groups": [{ "group": "Getting Started", "pages": ["index"] }]
|
|
115
|
-
}
|
|
86
|
+
"slug": "my-project",
|
|
87
|
+
"name": "My Project"
|
|
116
88
|
}
|
|
117
89
|
```
|
|
118
90
|
|
|
119
91
|
The CLI searches for `docs.json` in the current directory, then `docs/`, then `apps/docs/`.
|
|
120
92
|
|
|
121
|
-
## Programmatic API
|
|
122
|
-
|
|
123
|
-
```typescript
|
|
124
|
-
import type { DeploymentResponse } from "blodemd";
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
The package exports the `DeploymentResponse` type for use in custom deployment scripts.
|
|
128
|
-
|
|
129
93
|
## License
|
|
130
94
|
|
|
131
95
|
This repository is licensed under MIT. Generated docs folders do not include a license file by default.
|
|
@@ -29,7 +29,7 @@ export default function RootLayout({
|
|
|
29
29
|
className={`${glide.variable} ${GeistMono.variable}`}
|
|
30
30
|
suppressHydrationWarning
|
|
31
31
|
>
|
|
32
|
-
<body className="relative flex w-full flex-col justify-center overflow-x-hidden scroll-smooth bg-background font-sans antialiased [--header-height:calc(var(--spacing)*
|
|
32
|
+
<body className="relative flex w-full flex-col justify-center overflow-x-hidden scroll-smooth bg-background font-sans antialiased [--header-height:calc(var(--spacing)*16)]">
|
|
33
33
|
<DevReloadScript />
|
|
34
34
|
<Providers>{children}</Providers>
|
|
35
35
|
</body>
|
|
@@ -3,12 +3,29 @@ import { fileURLToPath } from "node:url";
|
|
|
3
3
|
|
|
4
4
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
5
5
|
const packagesDir = process.env.BLODEMD_PACKAGES_DIR;
|
|
6
|
+
const isStandalone = Boolean(packagesDir);
|
|
6
7
|
const turbopackRoot =
|
|
7
8
|
process.env.BLODEMD_TURBOPACK_ROOT ||
|
|
8
|
-
(
|
|
9
|
+
(isStandalone
|
|
9
10
|
? path.resolve(__dirname, "..")
|
|
10
11
|
: path.resolve(__dirname, "../.."));
|
|
11
12
|
|
|
13
|
+
// In monorepo mode we transpile @repo/* from source so edits to the
|
|
14
|
+
// package src/ files hot-reload. In standalone mode the @repo packages
|
|
15
|
+
// ship pre-built `dist/` via their package.json `exports`; transpiling
|
|
16
|
+
// their `src/` would make Turbopack miss the `.js` → `.ts` resolution
|
|
17
|
+
// for same-package imports, so we let Next consume the compiled output.
|
|
18
|
+
const repoTranspilePackages = isStandalone
|
|
19
|
+
? []
|
|
20
|
+
: [
|
|
21
|
+
"@repo/common",
|
|
22
|
+
"@repo/contracts",
|
|
23
|
+
"@repo/models",
|
|
24
|
+
"@repo/prebuild",
|
|
25
|
+
"@repo/previewing",
|
|
26
|
+
"@repo/validation",
|
|
27
|
+
];
|
|
28
|
+
|
|
12
29
|
/** @type {import('next').NextConfig} */
|
|
13
30
|
const nextConfig = {
|
|
14
31
|
allowedDevOrigins: ["127.0.0.1"],
|
|
@@ -26,14 +43,7 @@ const nextConfig = {
|
|
|
26
43
|
images: {
|
|
27
44
|
unoptimized: true,
|
|
28
45
|
},
|
|
29
|
-
transpilePackages:
|
|
30
|
-
"@repo/common",
|
|
31
|
-
"@repo/contracts",
|
|
32
|
-
"@repo/models",
|
|
33
|
-
"@repo/prebuild",
|
|
34
|
-
"@repo/previewing",
|
|
35
|
-
"@repo/validation",
|
|
36
|
-
],
|
|
46
|
+
transpilePackages: repoTranspilePackages,
|
|
37
47
|
turbopack: {
|
|
38
48
|
// The dev server consumes sibling docs/ and workspace packages/
|
|
39
49
|
// directories, so Turbopack needs a root that includes them.
|