@zvndev/darkmown 1.1.0 → 1.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +54 -3
  3. package/docs/cli.md +46 -16
  4. package/docs/spec-alignment.md +9 -3
  5. package/package.json +1 -1
  6. package/site/_/roadmap.json +3 -1
  7. package/site/pages/app.wd +1 -1
  8. package/site/pages/data.wd +2 -2
  9. package/site/pages/docs/index.wd +21 -0
  10. package/site/pages/folio/cart.wd +2 -2
  11. package/site/pages/forge/index.wd +1 -1
  12. package/site/pages/interactions/index.skin +113 -0
  13. package/site/pages/interactions/index.wd +86 -0
  14. package/src/api-runner.js +219 -0
  15. package/src/behaviors/carousel.js +153 -0
  16. package/src/behaviors/sortable.js +175 -0
  17. package/src/builder.js +199 -4
  18. package/src/cli.js +79 -54
  19. package/src/compiler/body.js +14 -0
  20. package/src/compiler/context.js +12 -1
  21. package/src/compiler/directives.js +123 -0
  22. package/src/compiler/loops.js +57 -8
  23. package/src/compiler/page.js +9 -3
  24. package/src/deploy.js +174 -0
  25. package/src/headers.js +4 -0
  26. package/src/runtime.js +3 -1
  27. package/src/scaffold.js +79 -147
  28. package/src/templates/blog/README.md +25 -0
  29. package/src/templates/blog/site/_/nav.wd +6 -0
  30. package/src/templates/blog/site/_/posts.json +16 -0
  31. package/src/templates/blog/site/pages/index.skin +51 -0
  32. package/src/templates/blog/site/pages/index.wd +24 -0
  33. package/src/templates/blog/site/pages/posts/hello-darkmown.md +16 -0
  34. package/src/templates/blog/site/pages/posts/markdown-native.md +20 -0
  35. package/src/templates/dashboard/README.md +25 -0
  36. package/src/templates/dashboard/api/metrics.js +15 -0
  37. package/src/templates/dashboard/site/_/nav.wd +6 -0
  38. package/src/templates/dashboard/site/pages/index.skin +74 -0
  39. package/src/templates/dashboard/site/pages/index.wd +75 -0
  40. package/src/templates/landing/README.md +25 -0
  41. package/src/templates/landing/site/_/nav.wd +6 -0
  42. package/src/templates/landing/site/pages/index.skin +140 -0
  43. package/src/templates/landing/site/pages/index.wd +54 -0
  44. package/src/templates/starter/README.md +32 -0
  45. package/src/templates/starter/site/_/nav.wd +7 -0
  46. package/src/templates/starter/site/pages/about.md +10 -0
  47. package/src/templates/starter/site/pages/index.skin +47 -0
  48. package/src/templates/starter/site/pages/index.wd +27 -0
  49. package/src/templates/store/README.md +28 -0
  50. package/src/templates/store/api/checkout.js +18 -0
  51. package/src/templates/store/site/_/nav.wd +6 -0
  52. package/src/templates/store/site/_/products.json +8 -0
  53. package/src/templates/store/site/pages/index.skin +100 -0
  54. package/src/templates/store/site/pages/index.wd +83 -0
@@ -0,0 +1,51 @@
1
+ tokens
2
+ ink #1d2530
3
+ paper #fbfaf7
4
+ muted #6b7785
5
+ accent #2f6df0
6
+
7
+ page
8
+ margin 0
9
+ font ui-sans-serif, system-ui, sans-serif
10
+ color $ink
11
+ bg $paper
12
+ line-height 1.6
13
+
14
+ main
15
+ max-width 720px
16
+ margin 0 auto
17
+ padding 2.5rem 1.5rem
18
+
19
+ nav
20
+ display flex
21
+ align-items center
22
+ justify-content space-between
23
+ max-width 720px
24
+ margin 0 auto
25
+ padding 1.25rem 1.5rem
26
+
27
+ nav strong
28
+ font-size 1.1rem
29
+
30
+ nav a
31
+ color $accent
32
+ text-decoration none
33
+
34
+ .post-card
35
+ padding 1.5rem 0
36
+ border-bottom 1px solid #e7e3da
37
+
38
+ .post-card h3
39
+ margin 0 0 .25rem
40
+
41
+ .post-card a
42
+ color $ink
43
+ text-decoration none
44
+
45
+ .post-card a:hover
46
+ color $accent
47
+
48
+ .post-meta
49
+ margin 0 0 .5rem
50
+ color $muted
51
+ font-size .9rem
@@ -0,0 +1,24 @@
1
+ ---
2
+ title: My Blog
3
+ description: A markdown-native blog built with Darkmown.
4
+ transitions: true
5
+ ---
6
+
7
+ @include /nav.wd
8
+
9
+ <main>
10
+
11
+ # My Blog
12
+
13
+ Posts are plain Markdown files in `site/pages/posts/`. This index is one `.wd`
14
+ loop over a small JSON manifest — sorted newest-first, shipping zero JavaScript.
15
+
16
+ @loop /posts.json into post sort by post.date desc
17
+ ::: post-card
18
+ ### [{ post.title }]({ post.url })
19
+ <p class="post-meta">{ post.date }</p>
20
+ { post.excerpt }
21
+ :::
22
+ @endloop
23
+
24
+ </main>
@@ -0,0 +1,16 @@
1
+ ---
2
+ title: Hello, Darkmown
3
+ description: Why I rewrote my blog as plain Markdown files.
4
+ transitions: true
5
+ ---
6
+
7
+ # Hello, Darkmown
8
+
9
+ This post is a plain `.md` file — strict CommonMark, **zero** framework
10
+ JavaScript. It loads instantly and is trivial to edit.
11
+
12
+ When I want something interactive — a like button, a live filter, a form — I
13
+ rename a file to `.wd` and add a directive. Static stays static; only the pages
14
+ that need it ship the tiny reactive runtime.
15
+
16
+ [← Back to all posts](/)
@@ -0,0 +1,20 @@
1
+ ---
2
+ title: Markdown-native, by default
3
+ description: Every post is a .md file; the index is one .wd loop.
4
+ transitions: true
5
+ ---
6
+
7
+ # Markdown-native, by default
8
+
9
+ To add a post, drop a Markdown file in `site/pages/posts/` and add a line to
10
+ `site/_/posts.json`. The home page loops that manifest:
11
+
12
+ ```wd
13
+ @loop /posts.json into post sort by post.date desc
14
+ ### [{ post.title }]({ post.url })
15
+ @endloop
16
+ ```
17
+
18
+ No build config, no plugins, no content layer. The file *is* the page.
19
+
20
+ [← Back to all posts](/)
@@ -0,0 +1,25 @@
1
+ # Dashboard — a Darkmown template
2
+
3
+ A live dashboard. The page is static; the stat cards `:fetch` their data from
4
+ `api/metrics.js` — a plain Web-standard `(request) => Response` function that runs
5
+ in `darkmown dev` and on every host. Loading and error states are handled inline.
6
+
7
+ - **Data** — `api/metrics.js`. Replace its body with a real query (DB, analytics,
8
+ billing). Add more endpoints as `api/<name>.js`; each maps to `/api/<name>`.
9
+ - **View** — `site/pages/index.wd` fetches `/api/metrics` and renders stat cards.
10
+
11
+ ## Commands
12
+
13
+ - `npm run dev` — live compiler + local `/api/*` runner on http://localhost:5173.
14
+ - `npm run build` — compile to `dist/`.
15
+ - `npm run preview` — serve the built `dist/` locally (static only; use `dev` for `/api`).
16
+
17
+ ## Deploy
18
+
19
+ ```sh
20
+ npx darkmown deploy vercel # or: npx darkmown deploy cloudflare
21
+ ```
22
+
23
+ [![Deploy to Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=YOUR_REPO_URL)
24
+ &nbsp;
25
+ [![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=YOUR_REPO_URL)
@@ -0,0 +1,15 @@
1
+ // Demo metrics endpoint. A plain Web-standard `(request) => Response` handler:
2
+ // it runs in `darkmown dev` and on Vercel Edge / Cloudflare Pages with no extra
3
+ // config. Returns a snapshot of stats — replace the body with a real query
4
+ // (database, analytics API, billing provider, …).
5
+ export const config = { runtime: "edge" };
6
+
7
+ export default function () {
8
+ return Response.json({
9
+ revenue: 48230,
10
+ orders: 312,
11
+ visitors: 8940,
12
+ conversion: 3.5,
13
+ updatedAt: new Date().toISOString()
14
+ });
15
+ }
@@ -0,0 +1,6 @@
1
+ <nav>
2
+ <strong>Dashboard</strong>
3
+ <span class="links">
4
+ <a href="/">Overview</a>
5
+ </span>
6
+ </nav>
@@ -0,0 +1,74 @@
1
+ tokens
2
+ ink #0f1722
3
+ paper #0b1018
4
+ panel #131c28
5
+ line #243245
6
+ muted #8aa0b8
7
+ accent #4f9cff
8
+
9
+ page
10
+ margin 0
11
+ font ui-sans-serif, system-ui, sans-serif
12
+ color #e7eefc
13
+ bg $paper
14
+ line-height 1.55
15
+
16
+ main
17
+ max-width 880px
18
+ margin 0 auto
19
+ padding 2rem 1.5rem
20
+
21
+ nav
22
+ display flex
23
+ align-items center
24
+ justify-content space-between
25
+ max-width 880px
26
+ margin 0 auto
27
+ padding 1.25rem 1.5rem
28
+
29
+ nav strong
30
+ font-size 1.1rem
31
+
32
+ nav a
33
+ color $accent
34
+ text-decoration none
35
+
36
+ .stat-grid
37
+ display grid
38
+ grid-template-columns repeat(auto-fit, minmax(160px, 1fr))
39
+ gap 1rem
40
+ margin 1.5rem 0
41
+
42
+ .stat
43
+ background $panel
44
+ border 1px solid $line
45
+ radius 12px
46
+ padding 1.1rem 1.25rem
47
+
48
+ .stat-label
49
+ color $muted
50
+ font-size .85rem
51
+ text-transform uppercase
52
+ letter-spacing .04em
53
+
54
+ .stat-num
55
+ font-size 1.9rem
56
+ font-weight 700
57
+ margin-top .35rem
58
+
59
+ .note
60
+ background $panel
61
+ border 1px solid $line
62
+ radius 10px
63
+ padding 1rem
64
+
65
+ .error
66
+ background #2a1620
67
+ border 1px solid #5b2738
68
+ radius 10px
69
+ padding 1rem
70
+
71
+ .updated
72
+ color $muted
73
+ font-size .85rem
74
+ margin-top .5rem
@@ -0,0 +1,75 @@
1
+ ---
2
+ title: Dashboard — built with Darkmown
3
+ description: A live dashboard — stat cards fetched from a serverless function, on an otherwise static page.
4
+ transitions: true
5
+ ---
6
+
7
+ @include /nav.wd
8
+
9
+ <main>
10
+
11
+ ::: section #dash
12
+
13
+ # Dashboard
14
+
15
+ :fetch metrics from "/api/metrics"
16
+
17
+ :if metrics_loading
18
+ ::: card .note
19
+ Loading metrics…
20
+ :::
21
+ :endif
22
+
23
+ :if metrics_error
24
+ ::: card .error
25
+ Couldn't load metrics: { metrics_error }
26
+ :::
27
+ :endif
28
+
29
+ :if metrics
30
+ ::: stat-grid
31
+ ::: card .stat
32
+ ::: stat-label
33
+ Revenue
34
+ :::
35
+ ::: stat-num
36
+ { metrics.revenue | money }
37
+ :::
38
+ :::
39
+ ::: card .stat
40
+ ::: stat-label
41
+ Orders
42
+ :::
43
+ ::: stat-num
44
+ { metrics.orders }
45
+ :::
46
+ :::
47
+ ::: card .stat
48
+ ::: stat-label
49
+ Visitors
50
+ :::
51
+ ::: stat-num
52
+ { metrics.visitors }
53
+ :::
54
+ :::
55
+ ::: card .stat
56
+ ::: stat-label
57
+ Conversion
58
+ :::
59
+ ::: stat-num
60
+ { metrics.conversion }%
61
+ :::
62
+ :::
63
+ :::
64
+
65
+ ::: updated
66
+ Updated { metrics.updatedAt }
67
+ :::
68
+ :endif
69
+
70
+ The numbers come from `api/metrics.js` — a serverless function that runs in
71
+ `darkmown dev` and on your host. The page itself stays static; only the data fetches.
72
+
73
+ :::
74
+
75
+ </main>
@@ -0,0 +1,25 @@
1
+ # Landing — a Darkmown template
2
+
3
+ A marketing one-pager: a hero, a feature grid, and a testimonials **carousel**.
4
+ The static parts ship zero framework JavaScript; only the carousel loads a tiny,
5
+ pay-for-what-you-use behavior module (`/__wd/behaviors/carousel.js`).
6
+
7
+ - **Carousel** — the `:carousel … :endcarousel` block; native CSS scroll-snap +
8
+ the behavior add prev/next, dots, and mouse drag. Touch swipe is native.
9
+ - **Everything else** — plain Markdown + `:::` containers, no JavaScript.
10
+
11
+ ## Commands
12
+
13
+ - `npm run dev` — live compiler on http://localhost:5173.
14
+ - `npm run build` — compile to `dist/`.
15
+ - `npm run preview` — serve the built `dist/` locally.
16
+
17
+ ## Deploy
18
+
19
+ ```sh
20
+ npx darkmown deploy vercel # or: npx darkmown deploy cloudflare
21
+ ```
22
+
23
+ [![Deploy to Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=YOUR_REPO_URL)
24
+ &nbsp;
25
+ [![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=YOUR_REPO_URL)
@@ -0,0 +1,6 @@
1
+ <nav>
2
+ <strong>Acme</strong>
3
+ <span class="links">
4
+ <a href="#start">Get started</a>
5
+ </span>
6
+ </nav>
@@ -0,0 +1,140 @@
1
+ tokens
2
+ ink #14161c
3
+ paper #ffffff
4
+ soft #f4f5f8
5
+ line #e6e8ee
6
+ accent #5b4bf5
7
+
8
+ page
9
+ margin 0
10
+ font ui-sans-serif, system-ui, sans-serif
11
+ color $ink
12
+ bg $paper
13
+ line-height 1.6
14
+
15
+ main
16
+ max-width 900px
17
+ margin 0 auto
18
+ padding 1rem 1.5rem 4rem
19
+
20
+ nav
21
+ display flex
22
+ align-items center
23
+ justify-content space-between
24
+ max-width 900px
25
+ margin 0 auto
26
+ padding 1.25rem 1.5rem
27
+
28
+ nav strong
29
+ font-size 1.15rem
30
+
31
+ nav a
32
+ color $accent
33
+ text-decoration none
34
+
35
+ .hero
36
+ text-align center
37
+ padding 3rem 1rem 2rem
38
+
39
+ .hero h1
40
+ font-size 2.75rem
41
+ margin 0 0 .5rem
42
+
43
+ .lede
44
+ font-size 1.2rem
45
+ color #555c6b
46
+ margin 0 0 1.5rem
47
+
48
+ .cta
49
+ display inline-block
50
+ bg $accent
51
+ color white
52
+ text-decoration none
53
+ padding .8rem 1.4rem
54
+ radius 10px
55
+ font-weight 600
56
+
57
+ .features
58
+ display grid
59
+ grid-template-columns repeat(auto-fit, minmax(220px, 1fr))
60
+ gap 1rem
61
+ margin 2rem 0
62
+
63
+ .feature
64
+ background $soft
65
+ border 1px solid $line
66
+ radius 12px
67
+ padding 1.25rem
68
+
69
+ .feature h3
70
+ margin .25rem 0 .5rem
71
+
72
+ .wd-carousel
73
+ position relative
74
+ margin 1rem 0 2rem
75
+
76
+ .wd-carousel-track
77
+ display flex
78
+ overflow-x auto
79
+ scroll-snap-type x mandatory
80
+ scroll-behavior smooth
81
+ gap 1rem
82
+
83
+ .wd-carousel-track .quote
84
+ flex 0 0 100%
85
+ scroll-snap-align start
86
+ background $soft
87
+ border 1px solid $line
88
+ radius 12px
89
+ padding 1.75rem
90
+ font-size 1.2rem
91
+
92
+ .quote .who
93
+ margin .5rem 0 0
94
+ color #555c6b
95
+ font-size .95rem
96
+
97
+ .wd-carousel-prev
98
+ position absolute
99
+ left -.5rem
100
+ top 40%
101
+
102
+ .wd-carousel-next
103
+ position absolute
104
+ right -.5rem
105
+ top 40%
106
+
107
+ .wd-carousel-prev, .wd-carousel-next
108
+ bg white
109
+ color $ink
110
+ border 1px solid $line
111
+ radius 999px
112
+ width 2.25rem
113
+ height 2.25rem
114
+ cursor pointer
115
+
116
+ .wd-carousel-dots
117
+ display flex
118
+ justify-content center
119
+ gap .5rem
120
+ margin-top .75rem
121
+
122
+ .wd-carousel-dot
123
+ width .6rem
124
+ height .6rem
125
+ padding 0
126
+ border 0
127
+ radius 999px
128
+ bg $line
129
+ cursor pointer
130
+
131
+ .wd-carousel-dot[aria-current="true"]
132
+ bg $accent
133
+
134
+ .cta-band
135
+ text-align center
136
+ background $soft
137
+ border 1px solid $line
138
+ radius 16px
139
+ padding 2.5rem
140
+ margin-top 2rem
@@ -0,0 +1,54 @@
1
+ ---
2
+ title: Acme — ship faster
3
+ description: A marketing one-pager built with Darkmown. Zero framework JS on the static parts, with a testimonials carousel.
4
+ transitions: true
5
+ ---
6
+
7
+ @include /nav.wd
8
+
9
+ <main>
10
+
11
+ ::: hero
12
+ # Ship faster with *Acme*
13
+ <p class="lede">The all-in-one toolkit your team actually enjoys using.</p>
14
+ <a class="cta" href="#start">Get started</a>
15
+ :::
16
+
17
+ ::: features
18
+ ::: feature
19
+ ### ⚡ Fast
20
+ Static pages, zero framework JavaScript. Instant loads, perfect Lighthouse.
21
+ :::
22
+ ::: feature
23
+ ### 🧩 Simple
24
+ Write Markdown. Add a directive only on the pages that need interactivity.
25
+ :::
26
+ ::: feature
27
+ ### 🚀 Deploy anywhere
28
+ One command to Vercel or Cloudflare — your API comes along for free.
29
+ :::
30
+ :::
31
+
32
+ ## What teams say
33
+
34
+ :carousel
35
+ ::: quote
36
+ > "Acme cut our launch time in half."
37
+ <p class="who">— Riley, Head of Product</p>
38
+ :::
39
+ ::: quote
40
+ > "The simplest stack we've ever shipped on."
41
+ <p class="who">— Sam, CTO</p>
42
+ :::
43
+ ::: quote
44
+ > "Our marketing pages load instantly now."
45
+ <p class="who">— Jordan, Growth</p>
46
+ :::
47
+ :endcarousel
48
+
49
+ ::: cta-band #start
50
+ ## Ready to build?
51
+ <a class="cta" href="/">Start now</a>
52
+ :::
53
+
54
+ </main>
@@ -0,0 +1,32 @@
1
+ # My Darkmown site
2
+
3
+ Run `npm install` and `npm run dev` to start the live compiler.
4
+
5
+ ## Commands
6
+
7
+ - `npm run dev` — live compiler on http://localhost:5173 with hot reload.
8
+ - `npm run build` — compile the site to `dist/`.
9
+ - `npm run preview` — serve the built `dist/` locally.
10
+
11
+ ## Deploy
12
+
13
+ One command (it builds, then prints your live URL — log in if prompted):
14
+
15
+ ```sh
16
+ npx darkmown deploy vercel # or: npx darkmown deploy cloudflare
17
+ ```
18
+
19
+ Or one-click, after pushing this repo to GitHub (replace `YOUR_REPO_URL`):
20
+
21
+ [![Deploy to Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=YOUR_REPO_URL)
22
+ &nbsp;
23
+ [![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=YOUR_REPO_URL)
24
+
25
+ ## Layout
26
+
27
+ - Pages live in `site/pages` — `.md` stays plain Markdown, `.wd` adds directives.
28
+ - Shared includes live in `site/_`.
29
+ - Backend functions live in `api/` — plain Web-standard `(request) => Response`.
30
+ They run in `darkmown dev` and on Vercel/Cloudflare with no extra config.
31
+ - Hidden route files start with `.` or `-`.
32
+ - Colocated `index.skin` and `index.js` attach to a page automatically.
@@ -0,0 +1,7 @@
1
+ <nav>
2
+ <strong>My site</strong>
3
+ <span class="links">
4
+ <a href="/">Home</a>
5
+ <a href="/about/">About</a>
6
+ </span>
7
+ </nav>
@@ -0,0 +1,10 @@
1
+ ---
2
+ title: About
3
+ ---
4
+
5
+ # About
6
+
7
+ This page is plain Markdown (`.md`) — strict CommonMark, zero framework JavaScript.
8
+ Rename it to `.wd` when you want directives like state, loops, or forms.
9
+
10
+ [Back home](/)
@@ -0,0 +1,47 @@
1
+ tokens
2
+ ink #172026
3
+ paper #f7f2e8
4
+ accent #0f8b8d
5
+
6
+ page
7
+ margin 0
8
+ font ui-sans-serif, system-ui, sans-serif
9
+ color $ink
10
+ bg $paper
11
+
12
+ main
13
+ max-width 760px
14
+ margin 0 auto
15
+ padding 3rem 1.5rem
16
+
17
+ nav
18
+ display flex
19
+ align-items center
20
+ justify-content space-between
21
+ gap 1rem
22
+ max-width 760px
23
+ margin 0 auto
24
+ padding 1.25rem 1.5rem
25
+
26
+ nav strong
27
+ font-size 1.1rem
28
+
29
+ nav .links
30
+ display flex
31
+ gap 1.25rem
32
+
33
+ nav a
34
+ color $ink
35
+ text-decoration none
36
+ opacity .8
37
+
38
+ nav a:hover
39
+ opacity 1
40
+ color $accent
41
+
42
+ button
43
+ bg $accent
44
+ color white
45
+ border 0
46
+ padding .75rem 1rem
47
+ radius 8px
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: My Darkmown site
3
+ ---
4
+
5
+ @include /nav.wd
6
+
7
+ <main>
8
+
9
+ # My Darkmown site
10
+
11
+ Plain Markdown works. Rename to `.wd` when you want directives.
12
+
13
+ :state count = 0
14
+
15
+ Count: { count }
16
+
17
+ :button "Increment" -> count++
18
+
19
+ :state todos = ["Write a page"]
20
+
21
+ @loop todos into todo
22
+ - { todo }
23
+ @endloop
24
+
25
+ :button "Add" -> todos += "Add a loop"
26
+
27
+ </main>
@@ -0,0 +1,28 @@
1
+ # Store — a Darkmown template
2
+
3
+ A storefront in Markdown: a product grid with live search, a shared `:store` cart,
4
+ and a checkout that POSTs to a serverless function.
5
+
6
+ - **Static catalog** — `site/pages/index.wd` loops `site/_/products.json`.
7
+ - **Cart** — a `:store` shared across the page; add/remove with `:button`.
8
+ - **Checkout** — `:form action="/api/checkout"` posts to `api/checkout.js`, a plain
9
+ Web-standard `(request) => Response` function that runs in `darkmown dev` and on
10
+ every host. Replace its body with your real payment + fulfilment logic.
11
+
12
+ ## Commands
13
+
14
+ - `npm run dev` — live compiler + the local `/api/*` runner on http://localhost:5173.
15
+ - `npm run build` — compile to `dist/`.
16
+ - `npm run preview` — serve the built `dist/` locally (static only; use `dev` for `/api`).
17
+
18
+ ## Deploy
19
+
20
+ ```sh
21
+ npx darkmown deploy vercel # or: npx darkmown deploy cloudflare
22
+ ```
23
+
24
+ Your `api/checkout.js` deploys automatically alongside the static site.
25
+
26
+ [![Deploy to Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=YOUR_REPO_URL)
27
+ &nbsp;
28
+ [![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=YOUR_REPO_URL)