create-bearminion 1.18.0 → 1.20.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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # create-bearminion
2
2
 
3
+ ## 1.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - c6dad44: The hosted editor has live preview, and its guide is a page of its own.
8
+
9
+ - **Live preview online.** A section just added, a layout switched and header or footer changes are now redrawn at once in the hosted editor, as in `astro dev`. Before, the preview endpoints answered 501 there and such changes showed only after Save and a reload. `bearminionHostedEditor` wires the theme's `src/lib/render-preview.ts` by itself (new option `previewModule`, a path or `false`); outside Astro, pass it as `editor.handle(request, { preview })`. Sites already on the hosted editor get it by updating `bearminion` and redeploying the editor project.
10
+ - **`signIn: 'optional'` no longer answers 500 to visitors.** The starter's `[...slug].astro` reads the build's content when a server build has no props. Existing sites: `npx bearminion@latest add hosted` updates the file.
11
+ - **Docs.** New page [Edit online](https://docs.bearminion.com/hosted-editor/): what the hosted editor is, who may edit (whoever may push to the repository), the setup in five steps, pull request mode, and its limits.
12
+ - **No longer experimental on Vercel.** The hosted editor and `githubStore` are tested end to end on real Vercel deployments with a real GitHub App. Cloudflare Workers has run only in the local Workers runtime and stays experimental.
13
+
14
+ ## 1.19.0
15
+
16
+ ### Minor Changes
17
+
18
+ - 3713ac3: The starter footer shows a "Powered by BearMinion" link to bearminion.com, and the Footer tab can switch it off.
19
+
20
+ - New `poweredBy` option in `defineSite({ footer })` (default false). When a theme enables it, the Footer tab gets a **Powered by BearMinion** switch and `site.json` accepts `footer.poweredBy`. The link is shown unless the value is `false`.
21
+ - The starter adds `atoms/PoweredBy.astro` and renders it in the bottom row of every footer variant. Existing sites are not changed: copy `Footer.astro` and `PoweredBy.astro` (`npx bearminion status` lists them as outdated) and add `poweredBy: true` to `site-definition.ts` to get it.
22
+
3
23
  ## 1.18.0
4
24
 
5
25
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bearminion",
3
- "version": "1.18.0",
3
+ "version": "1.20.0",
4
4
  "description": "Create a BearMinion site: an Astro website you edit by clicking on it. No database, no server.",
5
5
  "license": "MIT",
6
6
  "author": "Jakub Lange",
@@ -3,296 +3,296 @@
3
3
  "template": "default",
4
4
  "files": {
5
5
  "src/components/atoms/Button.astro": {
6
- "version": "1.18.0",
6
+ "version": "1.20.0",
7
7
  "hash": "7be42b3dc3a3b59bec169de32a9d801904689e2705473d1945724658dc799043"
8
8
  },
9
9
  "src/components/atoms/Emphasis.astro": {
10
- "version": "1.18.0",
10
+ "version": "1.20.0",
11
11
  "hash": "a62835636e2df3a02acf51c1610ba309e1085b7165576ecfbb570a2241aab6b0"
12
12
  },
13
13
  "src/components/atoms/Image.astro": {
14
- "version": "1.18.0",
14
+ "version": "1.20.0",
15
15
  "hash": "270f92dd48d0ac705053993f4e18f9c8acd09dd255c955218ba4a064b4507176"
16
16
  },
17
17
  "src/components/atoms/Typography.astro": {
18
- "version": "1.18.0",
18
+ "version": "1.20.0",
19
19
  "hash": "56e7ea3cf08ef4159d6b72c97761d13334b5468476e0226d62b42effd1368fd2"
20
20
  },
21
21
  "src/components/atoms/button.ts": {
22
- "version": "1.18.0",
22
+ "version": "1.20.0",
23
23
  "hash": "dfa3955ebb4416ecb1aea899f41b2d2abc26d163790615fbc8113a998a6cd6e6"
24
24
  },
25
25
  "src/components/atoms/image.ts": {
26
- "version": "1.18.0",
26
+ "version": "1.20.0",
27
27
  "hash": "63361cdb18f0fb89af00cc089b6afd33164aee315decbe41c55a448e09050e42"
28
28
  },
29
29
  "src/components/atoms/options.ts": {
30
- "version": "1.18.0",
30
+ "version": "1.20.0",
31
31
  "hash": "5fd517f2abfb3e650f740d37e68439807a7da4056aa57458dad60e322b6f5b62"
32
32
  },
33
33
  "src/components/atoms/typography.ts": {
34
- "version": "1.18.0",
34
+ "version": "1.20.0",
35
35
  "hash": "a4310d2e1ffae64d245c3d8b3fce2d220f19c598bb38f70ed1bd17c0262840c6"
36
36
  },
37
37
  "src/components/molecules/CommandLine.astro": {
38
- "version": "1.18.0",
38
+ "version": "1.20.0",
39
39
  "hash": "af11f7f28617129636ee1d0097c21427bdb7bfaa7d8ee2750faaa8bedcb67b06"
40
40
  },
41
41
  "src/components/molecules/MediaFrame.astro": {
42
- "version": "1.18.0",
42
+ "version": "1.20.0",
43
43
  "hash": "4ee34a12f403e8f55d0b63340fc88e176ec71cf278c503bd508bbf99a85a34d2"
44
44
  },
45
45
  "src/components/molecules/Pill.astro": {
46
- "version": "1.18.0",
46
+ "version": "1.20.0",
47
47
  "hash": "b7b32e8de70084159003552f61dbccaf8aa13d338f231183ca9443efa72c7644"
48
48
  },
49
49
  "src/components/molecules/SectionHeader.astro": {
50
- "version": "1.18.0",
50
+ "version": "1.20.0",
51
51
  "hash": "b2692e02875362cc9dac3dc7a6c80bd056bf8d2af2973da1eb62d9d268d6b9ba"
52
52
  },
53
53
  "src/components/molecules/SectionShell.astro": {
54
- "version": "1.18.0",
54
+ "version": "1.20.0",
55
55
  "hash": "dc57fc01c666f1fef4b1b9799c2c0728571ac123af1567df3cb6f1e6456d2843"
56
56
  },
57
57
  "src/components/sections/contact/Contact.astro": {
58
- "version": "1.18.0",
58
+ "version": "1.20.0",
59
59
  "hash": "4247463ccd5cdde93ab263f12908ca2a87e5e6c2b51b6e6025f712c919b7ece1"
60
60
  },
61
61
  "src/components/sections/contact/definition.ts": {
62
- "version": "1.18.0",
62
+ "version": "1.20.0",
63
63
  "hash": "9ce73d48688466dcbbb6a0943dcc88190d2be05c2aad8b60c8c2a189e78dad28"
64
64
  },
65
65
  "src/components/sections/contact/form.ts": {
66
- "version": "1.18.0",
66
+ "version": "1.20.0",
67
67
  "hash": "18b1f2e2527525a74313ec5e9903e2033b9e5ccae955e5778efd6af10e5b58dd"
68
68
  },
69
69
  "src/components/sections/contact/wireframe.ts": {
70
- "version": "1.18.0",
70
+ "version": "1.20.0",
71
71
  "hash": "91bbbf164a0c0eea2f526bf84fef2ba2ab02b298354049df6fbc73f171a1ce8f"
72
72
  },
73
73
  "src/components/sections/cta/Cta.astro": {
74
- "version": "1.18.0",
74
+ "version": "1.20.0",
75
75
  "hash": "0ae98e77b6d645b71f58dbf790908333be59dd16c3c558e924021ce2bcb0d2dc"
76
76
  },
77
77
  "src/components/sections/cta/definition.ts": {
78
- "version": "1.18.0",
78
+ "version": "1.20.0",
79
79
  "hash": "d6576c8a53ac59dae964644765d690f2938e589fc13b24c0a0993ead5ba62285"
80
80
  },
81
81
  "src/components/sections/cta/wireframe.ts": {
82
- "version": "1.18.0",
82
+ "version": "1.20.0",
83
83
  "hash": "5c4e998a2a30a4185776d5112c0dcf09130002f3a04d4f31752bb1346ae7fc3f"
84
84
  },
85
85
  "src/components/sections/faq/Faq.astro": {
86
- "version": "1.18.0",
86
+ "version": "1.20.0",
87
87
  "hash": "59843ad44db35cbe21acfc17c92b7455dcd0b293d5c4a91c5ce23daa70904039"
88
88
  },
89
89
  "src/components/sections/faq/definition.ts": {
90
- "version": "1.18.0",
90
+ "version": "1.20.0",
91
91
  "hash": "b24bdd9077c471379130d611ecdcda487d88b1108ab22dba0a6307839243eac8"
92
92
  },
93
93
  "src/components/sections/faq/wireframe.ts": {
94
- "version": "1.18.0",
94
+ "version": "1.20.0",
95
95
  "hash": "d3865d0b0d6fecf92eef5c9959cf495253527f7e73592726c42fa87fc2e21d38"
96
96
  },
97
97
  "src/components/sections/features/Features.astro": {
98
- "version": "1.18.0",
98
+ "version": "1.20.0",
99
99
  "hash": "fa2d4de7ada18b6fc9159c99db54aa9c09d8209b421db574251cec695e7abf9d"
100
100
  },
101
101
  "src/components/sections/features/definition.ts": {
102
- "version": "1.18.0",
102
+ "version": "1.20.0",
103
103
  "hash": "127837186fa07885e95a61f7a00dc6a965b3a74ffc589de3e3c9e31b360c13ca"
104
104
  },
105
105
  "src/components/sections/features/wireframe.ts": {
106
- "version": "1.18.0",
106
+ "version": "1.20.0",
107
107
  "hash": "20194a8cba45ed2da0625a6ff9d22d98cfd44188d73a477a2dda81a74a998c94"
108
108
  },
109
109
  "src/components/sections/gallery/Gallery.astro": {
110
- "version": "1.18.0",
110
+ "version": "1.20.0",
111
111
  "hash": "eaebd59bd511c49992172e95050fd868fc5d77e42ca1bf5f5004a914568f03f3"
112
112
  },
113
113
  "src/components/sections/gallery/definition.ts": {
114
- "version": "1.18.0",
114
+ "version": "1.20.0",
115
115
  "hash": "6fa007861bc9190421c8460d483cc51bd64a68da42b0d7e5cf7bb98aa319d838"
116
116
  },
117
117
  "src/components/sections/gallery/lightbox.ts": {
118
- "version": "1.18.0",
118
+ "version": "1.20.0",
119
119
  "hash": "887bbf98d40418a14d76561299162838fe28fd044170c3e7723e03975aad9932"
120
120
  },
121
121
  "src/components/sections/gallery/wireframe.ts": {
122
- "version": "1.18.0",
122
+ "version": "1.20.0",
123
123
  "hash": "85b3f742088b3c71be557aeac7927d2c69b831df4589413220c87484c49f2a81"
124
124
  },
125
125
  "src/components/sections/hero/Hero.astro": {
126
- "version": "1.18.0",
126
+ "version": "1.20.0",
127
127
  "hash": "65e50177ddc8b73ded1bf1fc71f2ae950ff1102457b73719e40ceec6467d56d9"
128
128
  },
129
129
  "src/components/sections/hero/HeroBadge.astro": {
130
- "version": "1.18.0",
130
+ "version": "1.20.0",
131
131
  "hash": "6467a7bb27d4dc718c568f069187385b507fedfb9f79ded3929ee0893126ce6f"
132
132
  },
133
133
  "src/components/sections/hero/definition.ts": {
134
- "version": "1.18.0",
134
+ "version": "1.20.0",
135
135
  "hash": "db17e42d4e7cc7ebf61e978c405cd9b5ef5c399c6a44c80beddec4e9784882a6"
136
136
  },
137
137
  "src/components/sections/hero/wireframe.ts": {
138
- "version": "1.18.0",
138
+ "version": "1.20.0",
139
139
  "hash": "4bbe971afb2d4f3af5166c3b525bffe6564627d4a6a3da218073fd5d6eaa68c0"
140
140
  },
141
141
  "src/components/sections/logo-strip/LogoStrip.astro": {
142
- "version": "1.18.0",
142
+ "version": "1.20.0",
143
143
  "hash": "b647d634c1a382779dc22550c84af65a88afbec8119a5b51ee058c521b7b95b5"
144
144
  },
145
145
  "src/components/sections/logo-strip/definition.ts": {
146
- "version": "1.18.0",
146
+ "version": "1.20.0",
147
147
  "hash": "de761c20c0ce0b5f4fcc1ad96535addf6f7fb668abd1954709d2f68f72ccffdd"
148
148
  },
149
149
  "src/components/sections/logo-strip/wireframe.ts": {
150
- "version": "1.18.0",
150
+ "version": "1.20.0",
151
151
  "hash": "aab635e481146a6d361cd16e2155654bbeaa202c19d7855251561f4d588144ed"
152
152
  },
153
153
  "src/components/sections/media/Media.astro": {
154
- "version": "1.18.0",
154
+ "version": "1.20.0",
155
155
  "hash": "8277c9c2ef089b437c5ccaa93b80d9f9c0020bfb9c4a29526264c29c25d6fcf0"
156
156
  },
157
157
  "src/components/sections/media/MediaPlayer.astro": {
158
- "version": "1.18.0",
158
+ "version": "1.20.0",
159
159
  "hash": "e5b8e9800c43e0a276ef763fddfb62e99cbb120f22a31928b81277d85a4626a8"
160
160
  },
161
161
  "src/components/sections/media/definition.ts": {
162
- "version": "1.18.0",
162
+ "version": "1.20.0",
163
163
  "hash": "520d1d78d234c8a005abeffe99fdfe12201cc78e56023bf627869b562974aa3c"
164
164
  },
165
165
  "src/components/sections/media/source.ts": {
166
- "version": "1.18.0",
166
+ "version": "1.20.0",
167
167
  "hash": "737f87a8352e226469968cdaae3d3240c3e1c9395ba0a4279fb6505ec039fb49"
168
168
  },
169
169
  "src/components/sections/media/wireframe.ts": {
170
- "version": "1.18.0",
170
+ "version": "1.20.0",
171
171
  "hash": "9afe102c0d66136de50dbe75b4d668b53897283950f71ba26c8e1e70e7abfc9f"
172
172
  },
173
173
  "src/components/sections/pricing/Pricing.astro": {
174
- "version": "1.18.0",
174
+ "version": "1.20.0",
175
175
  "hash": "611e1ee0cbd7dfd0f504f57966b6073e2559b35b7e33feb2caea4dbe5e2b71b8"
176
176
  },
177
177
  "src/components/sections/pricing/definition.ts": {
178
- "version": "1.18.0",
178
+ "version": "1.20.0",
179
179
  "hash": "447ad99f5b636a7ff566389102e9beb93b661bb2df969a6e93e740a9ca6ae216"
180
180
  },
181
181
  "src/components/sections/pricing/wireframe.ts": {
182
- "version": "1.18.0",
182
+ "version": "1.20.0",
183
183
  "hash": "a905ac85fe875c749d080e39929d5d8db51a47380c803b2930aa64fd2fd437d2"
184
184
  },
185
185
  "src/components/sections/shared.ts": {
186
- "version": "1.18.0",
186
+ "version": "1.20.0",
187
187
  "hash": "84a080557c50b73b14f6eac8fd00cabfb92700c07e1988989a6b699fdcbb695a"
188
188
  },
189
189
  "src/components/sections/stats/Stats.astro": {
190
- "version": "1.18.0",
190
+ "version": "1.20.0",
191
191
  "hash": "3a5f6cce7b45fd521a383185442571c125922efe4becbf765bd44f33ba394918"
192
192
  },
193
193
  "src/components/sections/stats/definition.ts": {
194
- "version": "1.18.0",
194
+ "version": "1.20.0",
195
195
  "hash": "c3550fc34e966fa41f5e1804cb439af5382cd09d47d7a68bee2ceccf6cebf568"
196
196
  },
197
197
  "src/components/sections/stats/wireframe.ts": {
198
- "version": "1.18.0",
198
+ "version": "1.20.0",
199
199
  "hash": "12e6123c53875eaaf2b110a92bd7ccb296e9e46cf47ff8e8343a596cc9b40efb"
200
200
  },
201
201
  "src/components/sections/steps/Steps.astro": {
202
- "version": "1.18.0",
202
+ "version": "1.20.0",
203
203
  "hash": "4b4895329a51a9da2c5e9984a55fead610a15582b05f8b5bed43635731307470"
204
204
  },
205
205
  "src/components/sections/steps/definition.ts": {
206
- "version": "1.18.0",
206
+ "version": "1.20.0",
207
207
  "hash": "c5f3f0b1dba9a2bc06f5c266f07256e6f8d9a3de5376544fa92c0e7d9e3a09b4"
208
208
  },
209
209
  "src/components/sections/steps/icons.ts": {
210
- "version": "1.18.0",
210
+ "version": "1.20.0",
211
211
  "hash": "12f7ca22de575d819a9789615a8b311aa55536884ce3be41e7b2a73c1a6358c1"
212
212
  },
213
213
  "src/components/sections/steps/wireframe.ts": {
214
- "version": "1.18.0",
214
+ "version": "1.20.0",
215
215
  "hash": "108888fc5cc4349c5c856db836cbfb10456338c403cd11d4edb2c463fc6bb8b0"
216
216
  },
217
217
  "src/components/sections/testimonials/Testimonials.astro": {
218
- "version": "1.18.0",
218
+ "version": "1.20.0",
219
219
  "hash": "113229d028ed6f742aa9d8ae6dbc1cfe67ac0602961265347b9f6df94b38eac1"
220
220
  },
221
221
  "src/components/sections/testimonials/definition.ts": {
222
- "version": "1.18.0",
222
+ "version": "1.20.0",
223
223
  "hash": "6fe3e4489be66ab1745670fb0d1f9fbc6e347375464470de975df1757b9e181c"
224
224
  },
225
225
  "src/components/sections/testimonials/wireframe.ts": {
226
- "version": "1.18.0",
226
+ "version": "1.20.0",
227
227
  "hash": "42ed8f23ed4ecc805c9477ffd1088a0a2d6a9e3b61f22ee0a726533cfa3eca53"
228
228
  },
229
229
  "src/components/sections/text-image/TextImage.astro": {
230
- "version": "1.18.0",
230
+ "version": "1.20.0",
231
231
  "hash": "8fdadd5ca3ee5412b726162f7f3681ec7d662c00f06c4959b0f27e6699142120"
232
232
  },
233
233
  "src/components/sections/text-image/definition.ts": {
234
- "version": "1.18.0",
234
+ "version": "1.20.0",
235
235
  "hash": "630028579eae5df29879e3b9e2230d4aa45c09d99de8e992de1f1b67da7154f9"
236
236
  },
237
237
  "src/components/sections/text-image/wireframe.ts": {
238
- "version": "1.18.0",
238
+ "version": "1.20.0",
239
239
  "hash": "af9a266f1120eee687823afe114ea3cdb656e1e0911eda30fb5574501544f96d"
240
240
  },
241
241
  "src/components/sections/text/Text.astro": {
242
- "version": "1.18.0",
242
+ "version": "1.20.0",
243
243
  "hash": "36204dc4282a98533581f1098ccf824ea175669b4b22b83af34df14f713a4f46"
244
244
  },
245
245
  "src/components/sections/text/definition.ts": {
246
- "version": "1.18.0",
246
+ "version": "1.20.0",
247
247
  "hash": "48f89d37e0154fc397d0f9092d36271661a657e9e1903c5ad90314d38ae04b10"
248
248
  },
249
249
  "src/components/sections/text/wireframe.ts": {
250
- "version": "1.18.0",
250
+ "version": "1.20.0",
251
251
  "hash": "fb55bafc2fa8dd9fee1cfa24ca54de644114d557e4610f7e083b9b01ed258522"
252
252
  },
253
253
  "src/components/seo/Seo.astro": {
254
- "version": "1.18.0",
254
+ "version": "1.20.0",
255
255
  "hash": "1bcd3ee145234663a8b3a0b101d76bb31e69dc8d6d028ad9a83d328cf3536bf4"
256
256
  },
257
257
  "src/env.d.ts": {
258
- "version": "1.18.0",
258
+ "version": "1.20.0",
259
259
  "hash": "17b0db27bd3d73f4accf3c7f7f0e7740a85809432d8875ffe830ddd350ce2963"
260
260
  },
261
261
  "src/lib/assets.ts": {
262
- "version": "1.18.0",
262
+ "version": "1.20.0",
263
263
  "hash": "8efa10327696d29ad9f4d2fc85a3962d969ba80db1cb63184b148000b7147450"
264
264
  },
265
265
  "src/lib/cn.ts": {
266
- "version": "1.18.0",
266
+ "version": "1.20.0",
267
267
  "hash": "ce39955d9af5f01f57eb69071fe2e4645e9091b240bc7185652cf4541ecb91fa"
268
268
  },
269
269
  "src/lib/contact-form.ts": {
270
- "version": "1.18.0",
270
+ "version": "1.20.0",
271
271
  "hash": "b52d5520d87e37f6c5f33128637aca671f744ede65588d751b2d69b3fcef849d"
272
272
  },
273
273
  "src/lib/editing.ts": {
274
- "version": "1.18.0",
274
+ "version": "1.20.0",
275
275
  "hash": "4d6a29a5a881d6a02e9fdac43b57a0a1d8d54b0749a6beec39f124c4a75f1c69"
276
276
  },
277
277
  "src/lib/hidden-text.ts": {
278
- "version": "1.18.0",
278
+ "version": "1.20.0",
279
279
  "hash": "44ae57dcbfaa71586589b212fe9a3eefcc5c5763d219e8d175095ea2b6722dcf"
280
280
  },
281
281
  "src/lib/image-url.ts": {
282
- "version": "1.18.0",
282
+ "version": "1.20.0",
283
283
  "hash": "deb9afab379804204634f3eeb0496dce6b923496c6f2bf33227d64e40fa5809f"
284
284
  },
285
285
  "src/lib/link-attrs.ts": {
286
- "version": "1.18.0",
286
+ "version": "1.20.0",
287
287
  "hash": "648802476e4dfaaeab6c4172313c683420c1fb66898de8f8c74ca4adf876cd37"
288
288
  },
289
289
  "src/pages/404.astro": {
290
- "version": "1.18.0",
290
+ "version": "1.20.0",
291
291
  "hash": "3c322ae407871b6fb7fae74d1421eaa7f0e0497605ab44ddff0cf7297b7cbfe5"
292
292
  },
293
293
  "src/pages/[...slug].astro": {
294
- "version": "1.18.0",
295
- "hash": "08bf1ac4b4a8a9961045f91e74a22aa2ec3b622998ebfa1f167ab39039bbf467"
294
+ "version": "1.20.0",
295
+ "hash": "dfe279b2d84767700c0fbbbb85077c3f8f7334671adc25c633ae2fb1802ac28f"
296
296
  }
297
297
  }
298
298
  }
@@ -19,7 +19,7 @@
19
19
  "@fontsource/jetbrains-mono": "^5.3.0",
20
20
  "@tailwindcss/vite": "^4.1.12",
21
21
  "astro": "^7.4.1",
22
- "bearminion": "^1.18.0",
22
+ "bearminion": "^1.20.0",
23
23
  "class-variance-authority": "^0.7.1",
24
24
  "sharp": "^0.35.5",
25
25
  "tailwind-merge": "^3.7.0",
@@ -0,0 +1,5 @@
1
+ ---
2
+ /** The footer's "Powered by BearMinion" link. The Footer tab switches it off (`footer.poweredBy: false`). */
3
+ ---
4
+
5
+ <a href="https://bearminion.com" target="_blank" rel="noopener" class="transition-colors hover:text-fg" data-powered-by>Powered by BearMinion</a>
@@ -4,6 +4,7 @@ import { markClass, splitMarkedText } from 'bearminion/marks'
4
4
  import { anchorAttrs } from '../../lib/link-attrs'
5
5
  import ConsentLink from '../atoms/ConsentLink.astro'
6
6
  import LogoMark from '../atoms/LogoMark.astro'
7
+ import PoweredBy from '../atoms/PoweredBy.astro'
7
8
  import Typography from '../atoms/Typography.astro'
8
9
  import FooterLinks from './FooterLinks.astro'
9
10
 
@@ -15,6 +16,8 @@ interface Props {
15
16
 
16
17
  const { site, consentLabel } = Astro.props
17
18
  const { variant, tone, text, legal, badge, columns } = site.footer
19
+ // Only `false` hides the credit, so a site.json written before the option existed keeps showing it.
20
+ const poweredBy = site.footer.poweredBy !== false
18
21
  const flatLinks = columns
19
22
  .flatMap((column, columnIndex) => column.links.map((link, linkIndex) => ({ link, columnIndex, linkIndex })))
20
23
  .slice(0, 6)
@@ -44,10 +47,11 @@ const wordmark = splitMarkedText(site.name, site.nameMarks)
44
47
  ))}
45
48
  </ul>
46
49
  </div>
47
- {(legal || consentLabel) && (
50
+ {(legal || consentLabel || poweredBy) && (
48
51
  <div class="mt-10 flex flex-wrap items-baseline gap-x-6 gap-y-2 border-t border-[var(--line)] pt-6 text-[0.8125rem] text-muted">
49
52
  {legal && <p data-field="footer.legal">{legal}</p>}
50
53
  {consentLabel && <ConsentLink label={consentLabel} />}
54
+ {poweredBy && <PoweredBy />}
51
55
  </div>
52
56
  )}
53
57
  </div>
@@ -83,10 +87,11 @@ const wordmark = splitMarkedText(site.name, site.nameMarks)
83
87
  ))}
84
88
  </div>
85
89
  </div>
86
- {(legal || consentLabel) && (
90
+ {(legal || consentLabel || poweredBy) && (
87
91
  <div class="mt-12 flex flex-wrap items-baseline gap-x-6 gap-y-2 border-t border-[var(--line)] pt-6 text-[0.8125rem] text-muted">
88
92
  {legal && <p data-field="footer.legal">{legal}</p>}
89
93
  {consentLabel && <ConsentLink label={consentLabel} />}
94
+ {poweredBy && <PoweredBy />}
90
95
  </div>
91
96
  )}
92
97
  </div>
@@ -119,6 +124,7 @@ const wordmark = splitMarkedText(site.name, site.nameMarks)
119
124
  <div class="flex flex-wrap items-baseline gap-x-6 gap-y-2">
120
125
  {legal && <p data-field="footer.legal">{legal}</p>}
121
126
  {consentLabel && <ConsentLink label={consentLabel} />}
127
+ {poweredBy && <PoweredBy />}
122
128
  </div>
123
129
  <a href="#content" class="transition-colors hover:text-fg">
124
130
  Back to top ↑
@@ -2,7 +2,7 @@ import { defineSite, type SiteOf } from 'bearminion'
2
2
 
3
3
  /**
4
4
  * The site chrome of this theme: the header and footer layouts, how many buttons and columns they
5
- * hold, and whether the footer has a badge. The editor builds its Header and Footer tabs from this,
5
+ * hold, whether the footer has a badge, and whether it has a "Powered by BearMinion" link. The editor builds its Header and Footer tabs from this,
6
6
  * and `site.json` is validated against it. Header.astro and Footer.astro render each variant.
7
7
  *
8
8
  * It holds no `.astro` imports, so `astro.config.ts` and the editor can load it.
@@ -19,6 +19,8 @@ export const siteDefinition = defineSite({
19
19
  defaultVariant: 'columns',
20
20
  maxColumns: 3,
21
21
  badge: true,
22
+ // The footer's "Powered by BearMinion" link. The Footer tab can switch it off; remove this line to drop the option.
23
+ poweredBy: true,
22
24
  },
23
25
  })
24
26
 
@@ -3,7 +3,7 @@ import type { Site } from '../components/organisms/site-definition'
3
3
  import type { Page } from '../components/sections/definitions'
4
4
  import SectionList from '../components/sections/SectionList.astro'
5
5
  import Base from '../layouts/Base.astro'
6
- import { getPages, getSite } from '../lib/content'
6
+ import { getPage, getPages, getSite } from '../lib/content'
7
7
 
8
8
  export async function getStaticPaths() {
9
9
  const site = await getSite()
@@ -31,6 +31,11 @@ if (live) {
31
31
  site = (await live.content.getSite()) as Site
32
32
  page = (await live.content.getPage(Astro.params.slug ?? 'index')) as Page | undefined
33
33
  if (!page) return Astro.rewrite('/404')
34
+ } else if (!page) {
35
+ // A server build has no props: a visitor to a hosted editor with `signIn: 'optional'` gets the build's content.
36
+ site = await getSite()
37
+ page = await getPage(Astro.params.slug ?? 'index')
38
+ if (!page || page.slug === '404') return Astro.rewrite('/404')
34
39
  }
35
40
  if (!site || !page) throw new Error(`No content for ${Astro.url.pathname}.`)
36
41
  ---