blodemd 0.0.8 → 0.0.10
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 +25 -9
- package/dev-server/app/[[...slug]]/page.tsx +1 -0
- package/dev-server/app/favicon.ico +0 -0
- package/dev-server/next.config.js +11 -13
- package/dev-server/package.json +1 -1
- package/dev-server/tsconfig.json +3 -0
- package/dist/cli.mjs +869 -184
- package/dist/cli.mjs.map +1 -1
- package/docs/app/globals.css +1 -1
- package/docs/components/animate-ui/primitives/buttons/button.tsx +14 -0
- package/docs/components/api/api-playground.tsx +255 -80
- package/docs/components/api/api-reference.tsx +11 -1
- package/docs/components/docs/contextual-menu.tsx +227 -142
- package/docs/components/docs/copy-page-menu.tsx +148 -85
- package/docs/components/docs/doc-header.tsx +13 -3
- package/docs/components/docs/doc-shell.tsx +25 -14
- package/docs/components/docs/mobile-nav.tsx +0 -6
- package/docs/components/mdx/code-group.tsx +171 -62
- package/docs/components/mdx/steps.tsx +1 -1
- package/docs/components/mdx/tabs.tsx +131 -26
- package/docs/components/ui/copy-button.tsx +122 -0
- package/docs/components/ui/input.tsx +0 -1
- package/docs/components/ui/search.tsx +241 -132
- package/docs/components/ui/site-footer.tsx +39 -0
- package/docs/lib/config.ts +7 -0
- package/docs/lib/content-root.ts +33 -0
- package/docs/lib/content-source.ts +70 -0
- package/docs/lib/contextual-options.ts +20 -0
- package/docs/lib/docs-runtime.tsx +595 -0
- package/docs/lib/edge-config.ts +95 -0
- package/docs/lib/env.ts +22 -0
- package/docs/lib/openapi-proxy.ts +88 -0
- package/docs/lib/platform-config.ts +6 -0
- package/docs/lib/routes.ts +39 -0
- package/docs/lib/supabase.ts +13 -0
- package/docs/lib/tenancy.ts +350 -0
- package/docs/lib/tenant-headers.ts +14 -0
- package/docs/lib/tenant-static.ts +529 -0
- package/docs/lib/tenant-utility-context.ts +62 -0
- package/docs/lib/tenants.ts +68 -0
- package/docs/lib/use-mobile.ts +19 -0
- package/package.json +3 -2
- package/packages/@repo/common/dist/index.d.ts +7 -0
- package/packages/@repo/common/dist/index.d.ts.map +1 -1
- package/packages/@repo/common/dist/index.js +42 -0
- package/packages/@repo/common/src/index.ts +50 -0
- package/packages/@repo/contracts/dist/project.d.ts +1 -1
- package/packages/@repo/contracts/dist/project.js +1 -1
- package/packages/@repo/contracts/src/project.ts +1 -1
- package/packages/@repo/models/dist/docs-config.d.ts +194 -29
- package/packages/@repo/models/dist/docs-config.d.ts.map +1 -1
- package/packages/@repo/models/dist/docs-config.js +3 -28
- package/packages/@repo/models/src/docs-config.ts +5 -31
- package/packages/@repo/previewing/dist/blob-source.d.ts.map +1 -1
- package/packages/@repo/previewing/dist/blob-source.js +7 -2
- package/packages/@repo/previewing/dist/fs-source.d.ts.map +1 -1
- package/packages/@repo/previewing/dist/fs-source.js +2 -3
- package/packages/@repo/previewing/dist/index.d.ts.map +1 -1
- package/packages/@repo/previewing/dist/index.js +20 -50
- package/packages/@repo/previewing/src/blob-source.ts +7 -4
- package/packages/@repo/previewing/src/fs-source.ts +2 -3
- package/packages/@repo/previewing/src/index.ts +29 -64
- package/packages/@repo/validation/dist/index.d.ts +2 -2
- package/packages/@repo/validation/dist/index.d.ts.map +1 -1
- package/packages/@repo/validation/dist/index.js +2 -2
- package/packages/@repo/validation/package.json +1 -0
- package/packages/@repo/validation/src/{mintlify-docs-schema.json → blodemd-docs-schema.json} +346 -1794
- package/packages/@repo/validation/src/index.ts +4 -4
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
- **One-command deploy:** Push your entire docs folder to Blode.md with `blodemd push`.
|
|
10
|
-
- **Scaffold in seconds:** Generate a ready-to-edit docs folder with `blodemd
|
|
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
|
- **CI-friendly:** Authenticate via environment variables and use the GitHub Action for automated deploys.
|
|
13
13
|
|
|
@@ -23,13 +23,27 @@ Or run without installing:
|
|
|
23
23
|
npx blodemd
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
Requires Node.js 20.17
|
|
26
|
+
Requires Node.js 20.17+.
|
|
27
27
|
|
|
28
28
|
## Quick Start
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
#
|
|
32
|
-
|
|
31
|
+
# Create a new docs site
|
|
32
|
+
# Empty directories scaffold in place.
|
|
33
|
+
# Non-empty directories get a Mint-style safety prompt.
|
|
34
|
+
blodemd new
|
|
35
|
+
|
|
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
|
|
33
47
|
|
|
34
48
|
# Preview locally
|
|
35
49
|
blodemd dev
|
|
@@ -44,7 +58,7 @@ blodemd push
|
|
|
44
58
|
## Commands
|
|
45
59
|
|
|
46
60
|
```bash
|
|
47
|
-
blodemd
|
|
61
|
+
blodemd new [directory] Create a new blode.md documentation site
|
|
48
62
|
blodemd login Authenticate with your API key
|
|
49
63
|
blodemd logout Remove stored credentials
|
|
50
64
|
blodemd whoami Show current authentication
|
|
@@ -65,6 +79,10 @@ blodemd dev [dir] Start the local docs preview server
|
|
|
65
79
|
|
|
66
80
|
The CLI reads the project slug from the `name` field in `docs.json` when `--project` is not set.
|
|
67
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.
|
|
85
|
+
|
|
68
86
|
### `dev` Options
|
|
69
87
|
|
|
70
88
|
```bash
|
|
@@ -90,10 +108,8 @@ The CLI looks for a `docs.json` file in the docs directory. Minimal example:
|
|
|
90
108
|
|
|
91
109
|
```json
|
|
92
110
|
{
|
|
93
|
-
"$schema": "https://
|
|
111
|
+
"$schema": "https://blode.md/docs.json",
|
|
94
112
|
"name": "my-project",
|
|
95
|
-
"theme": "mint",
|
|
96
|
-
"colors": { "primary": "#0D9373" },
|
|
97
113
|
"navigation": {
|
|
98
114
|
"groups": [{ "group": "Getting Started", "pages": ["index"] }]
|
|
99
115
|
}
|
|
@@ -112,4 +128,4 @@ The package exports the `DeploymentResponse` type for use in custom deployment s
|
|
|
112
128
|
|
|
113
129
|
## License
|
|
114
130
|
|
|
115
|
-
|
|
131
|
+
This repository is licensed under MIT. Generated docs folders do not include a license file by default.
|
|
Binary file
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
// to the directory containing shipped @repo packages.
|
|
4
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
5
5
|
const packagesDir = process.env.BLODEMD_PACKAGES_DIR;
|
|
6
|
+
const turbopackRoot =
|
|
7
|
+
process.env.BLODEMD_TURBOPACK_ROOT ||
|
|
8
|
+
(packagesDir
|
|
9
|
+
? path.resolve(__dirname, "..")
|
|
10
|
+
: path.resolve(__dirname, "../.."));
|
|
6
11
|
|
|
7
12
|
/** @type {import('next').NextConfig} */
|
|
8
13
|
const nextConfig = {
|
|
@@ -29,17 +34,10 @@ const nextConfig = {
|
|
|
29
34
|
"@repo/previewing",
|
|
30
35
|
"@repo/validation",
|
|
31
36
|
],
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// can resolve @repo/common from packages/@repo/common/.
|
|
37
|
-
config.resolve.modules = [
|
|
38
|
-
path.resolve(packagesDir),
|
|
39
|
-
...(config.resolve.modules || []),
|
|
40
|
-
];
|
|
41
|
-
}
|
|
42
|
-
return config;
|
|
37
|
+
turbopack: {
|
|
38
|
+
// The dev server consumes sibling docs/ and workspace packages/
|
|
39
|
+
// directories, so Turbopack needs a root that includes them.
|
|
40
|
+
root: turbopackRoot,
|
|
43
41
|
},
|
|
44
42
|
};
|
|
45
43
|
|
package/dev-server/package.json
CHANGED