mdorigin 0.1.8 → 0.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.
- package/README.md +12 -0
- package/dist/adapters/cloudflare.d.ts +40 -4
- package/dist/adapters/cloudflare.js +163 -7
- package/dist/adapters/node.js +2 -2
- package/dist/cli/build-cloudflare.js +27 -2
- package/dist/cli/help.js +5 -4
- package/dist/cli/init-cloudflare.js +7 -1
- package/dist/cli/main.js +5 -0
- package/dist/cli/sync-cloudflare-r2.d.ts +1 -0
- package/dist/cli/sync-cloudflare-r2.js +47 -0
- package/dist/cloudflare-runtime.d.ts +1 -1
- package/dist/cloudflare.d.ts +42 -6
- package/dist/cloudflare.js +246 -10
- package/dist/core/content-store.d.ts +1 -0
- package/dist/core/content-store.js +8 -1
- package/dist/core/extensions.d.ts +5 -9
- package/dist/core/markdown.js +6 -2
- package/dist/core/request-handler.js +46 -60
- package/dist/core/site-config.d.ts +4 -10
- package/dist/core/site-config.js +18 -10
- package/dist/html/template.d.ts +5 -9
- package/dist/html/template.js +25 -25
- package/dist/html/theme.d.ts +1 -2
- package/dist/html/theme.js +2 -642
- package/dist/index-builder.js +5 -4
- package/dist/search.js +3 -2
- package/package.json +4 -2
- package/dist/html/template-kind.d.ts +0 -1
- package/dist/html/template-kind.js +0 -1
package/dist/html/theme.js
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
export function
|
|
2
|
-
|
|
3
|
-
switch (theme) {
|
|
4
|
-
case 'atlas':
|
|
5
|
-
return buildAtlasThemeStyles();
|
|
6
|
-
case 'gazette':
|
|
7
|
-
return buildGazetteThemeStyles();
|
|
8
|
-
case 'paper':
|
|
9
|
-
default:
|
|
10
|
-
return buildPaperThemeStyles();
|
|
11
|
-
}
|
|
12
|
-
})();
|
|
13
|
-
return `${themeStyles}\n${buildSharedSearchStyles()}`;
|
|
1
|
+
export function getDefaultThemeStyles() {
|
|
2
|
+
return `${buildAtlasThemeStyles()}\n${buildSharedSearchStyles()}`;
|
|
14
3
|
}
|
|
15
4
|
function buildSharedSearchStyles() {
|
|
16
5
|
return `
|
|
@@ -129,318 +118,6 @@ function buildSharedSearchStyles() {
|
|
|
129
118
|
width: min(100%, 34rem);
|
|
130
119
|
}
|
|
131
120
|
}
|
|
132
|
-
`.trim();
|
|
133
|
-
}
|
|
134
|
-
function buildPaperThemeStyles() {
|
|
135
|
-
return `
|
|
136
|
-
:root {
|
|
137
|
-
color-scheme: light;
|
|
138
|
-
--bg: #f7f4ee;
|
|
139
|
-
--surface: #fffdf9;
|
|
140
|
-
--text: #1c1a17;
|
|
141
|
-
--muted: #6d655c;
|
|
142
|
-
--border: #ddd3c4;
|
|
143
|
-
--link: #7a3d16;
|
|
144
|
-
--link-hover: #57290f;
|
|
145
|
-
--code-bg: #f1ece3;
|
|
146
|
-
--quote: #8e7f6d;
|
|
147
|
-
--max: 46rem;
|
|
148
|
-
}
|
|
149
|
-
* { box-sizing: border-box; }
|
|
150
|
-
html { font-size: 18px; }
|
|
151
|
-
body {
|
|
152
|
-
margin: 0;
|
|
153
|
-
background:
|
|
154
|
-
radial-gradient(circle at top, rgba(255,255,255,0.95), transparent 40%),
|
|
155
|
-
linear-gradient(180deg, #f3eee4 0%, var(--bg) 100%);
|
|
156
|
-
color: var(--text);
|
|
157
|
-
font-family: Charter, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
|
|
158
|
-
line-height: 1.75;
|
|
159
|
-
}
|
|
160
|
-
a { color: var(--link); text-decoration-thickness: 0.08em; text-underline-offset: 0.14em; }
|
|
161
|
-
a:hover { color: var(--link-hover); }
|
|
162
|
-
.site-header {
|
|
163
|
-
max-width: calc(var(--max) + 4rem);
|
|
164
|
-
margin: 0 auto;
|
|
165
|
-
padding: 1.25rem 2rem 0;
|
|
166
|
-
}
|
|
167
|
-
.site-header__inner {
|
|
168
|
-
display: grid;
|
|
169
|
-
grid-template-columns: minmax(0, 1fr) auto;
|
|
170
|
-
gap: 0.75rem 1.75rem;
|
|
171
|
-
align-items: end;
|
|
172
|
-
}
|
|
173
|
-
.site-header__brand { min-width: 0; }
|
|
174
|
-
.site-header__title { margin: 0; }
|
|
175
|
-
.site-header__brand span {
|
|
176
|
-
display: block;
|
|
177
|
-
margin-top: 0.3rem;
|
|
178
|
-
color: var(--muted);
|
|
179
|
-
font-size: 0.95rem;
|
|
180
|
-
}
|
|
181
|
-
.site-header__title a {
|
|
182
|
-
display: inline-block;
|
|
183
|
-
color: var(--muted);
|
|
184
|
-
text-decoration: none;
|
|
185
|
-
font-size: 0.92rem;
|
|
186
|
-
letter-spacing: 0.06em;
|
|
187
|
-
text-transform: uppercase;
|
|
188
|
-
}
|
|
189
|
-
.site-header__logo {
|
|
190
|
-
display: inline-flex;
|
|
191
|
-
align-items: center;
|
|
192
|
-
margin-right: 0.55rem;
|
|
193
|
-
vertical-align: middle;
|
|
194
|
-
}
|
|
195
|
-
.site-header__logo img {
|
|
196
|
-
display: block;
|
|
197
|
-
width: 1.4rem;
|
|
198
|
-
height: 1.4rem;
|
|
199
|
-
object-fit: contain;
|
|
200
|
-
}
|
|
201
|
-
.site-nav ul {
|
|
202
|
-
list-style: none;
|
|
203
|
-
display: flex;
|
|
204
|
-
flex-wrap: wrap;
|
|
205
|
-
gap: 0.9rem;
|
|
206
|
-
margin: 0;
|
|
207
|
-
padding: 0;
|
|
208
|
-
align-items: center;
|
|
209
|
-
justify-content: flex-end;
|
|
210
|
-
}
|
|
211
|
-
.site-nav {
|
|
212
|
-
min-width: 0;
|
|
213
|
-
}
|
|
214
|
-
.site-nav li {
|
|
215
|
-
display: flex;
|
|
216
|
-
align-items: center;
|
|
217
|
-
margin: 0;
|
|
218
|
-
}
|
|
219
|
-
.site-nav li + li {
|
|
220
|
-
margin-top: 0;
|
|
221
|
-
}
|
|
222
|
-
.site-nav a {
|
|
223
|
-
color: var(--text);
|
|
224
|
-
text-decoration: none;
|
|
225
|
-
font-size: 0.95rem;
|
|
226
|
-
font-weight: 600;
|
|
227
|
-
text-transform: none;
|
|
228
|
-
letter-spacing: 0;
|
|
229
|
-
display: inline-flex;
|
|
230
|
-
align-items: center;
|
|
231
|
-
min-height: 2rem;
|
|
232
|
-
padding: 0 0.1rem;
|
|
233
|
-
}
|
|
234
|
-
.site-nav a:hover { text-decoration: underline; }
|
|
235
|
-
main {
|
|
236
|
-
max-width: calc(var(--max) + 4rem);
|
|
237
|
-
margin: 0 auto;
|
|
238
|
-
padding: 1.25rem 2rem 4rem;
|
|
239
|
-
}
|
|
240
|
-
.site-footer {
|
|
241
|
-
max-width: calc(var(--max) + 4rem);
|
|
242
|
-
margin: 0 auto;
|
|
243
|
-
padding: 0 2rem 2.5rem;
|
|
244
|
-
}
|
|
245
|
-
.site-footer__inner {
|
|
246
|
-
border-top: 1px solid var(--border);
|
|
247
|
-
padding-top: 1rem;
|
|
248
|
-
color: var(--muted);
|
|
249
|
-
}
|
|
250
|
-
.site-footer__meta {
|
|
251
|
-
margin-top: 0.9rem;
|
|
252
|
-
display: flex;
|
|
253
|
-
align-items: center;
|
|
254
|
-
justify-content: space-between;
|
|
255
|
-
gap: 1rem;
|
|
256
|
-
}
|
|
257
|
-
.site-footer__actions {
|
|
258
|
-
display: inline-flex;
|
|
259
|
-
align-items: center;
|
|
260
|
-
gap: 0.85rem;
|
|
261
|
-
flex-wrap: wrap;
|
|
262
|
-
}
|
|
263
|
-
.site-footer__nav ul,
|
|
264
|
-
.site-footer__social {
|
|
265
|
-
list-style: none;
|
|
266
|
-
display: flex;
|
|
267
|
-
flex-wrap: wrap;
|
|
268
|
-
gap: 0.85rem;
|
|
269
|
-
margin: 0;
|
|
270
|
-
padding: 0;
|
|
271
|
-
}
|
|
272
|
-
.site-footer__nav li,
|
|
273
|
-
.site-footer__social li {
|
|
274
|
-
margin: 0;
|
|
275
|
-
}
|
|
276
|
-
.site-footer__social {
|
|
277
|
-
margin-top: 0.9rem;
|
|
278
|
-
}
|
|
279
|
-
.site-footer__social a {
|
|
280
|
-
display: inline-flex;
|
|
281
|
-
align-items: center;
|
|
282
|
-
justify-content: center;
|
|
283
|
-
width: 2rem;
|
|
284
|
-
height: 2rem;
|
|
285
|
-
color: var(--muted);
|
|
286
|
-
}
|
|
287
|
-
.site-footer__social svg {
|
|
288
|
-
width: 1rem;
|
|
289
|
-
height: 1rem;
|
|
290
|
-
fill: currentColor;
|
|
291
|
-
}
|
|
292
|
-
.site-footer__social-label {
|
|
293
|
-
font-size: 0.82rem;
|
|
294
|
-
font-weight: 700;
|
|
295
|
-
}
|
|
296
|
-
.site-footer__text,
|
|
297
|
-
.site-footer__edit-link,
|
|
298
|
-
.site-footer__markdown-link {
|
|
299
|
-
display: block;
|
|
300
|
-
margin-top: 0.9rem;
|
|
301
|
-
}
|
|
302
|
-
.site-footer__edit-link,
|
|
303
|
-
.site-footer__markdown-link {
|
|
304
|
-
display: inline-block;
|
|
305
|
-
margin-top: 0;
|
|
306
|
-
font-size: 0.78rem;
|
|
307
|
-
color: var(--muted);
|
|
308
|
-
opacity: 0.72;
|
|
309
|
-
}
|
|
310
|
-
@media (max-width: 720px) {
|
|
311
|
-
.site-footer__meta {
|
|
312
|
-
flex-direction: column;
|
|
313
|
-
align-items: flex-start;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
article {
|
|
317
|
-
background: color-mix(in srgb, var(--surface) 92%, white 8%);
|
|
318
|
-
border: 1px solid var(--border);
|
|
319
|
-
border-radius: 22px;
|
|
320
|
-
padding: 2.5rem;
|
|
321
|
-
box-shadow: 0 16px 40px rgba(52, 41, 29, 0.07);
|
|
322
|
-
}
|
|
323
|
-
article > p:first-child {
|
|
324
|
-
margin-top: 0;
|
|
325
|
-
color: var(--muted);
|
|
326
|
-
font-size: 0.95rem;
|
|
327
|
-
font-weight: 600;
|
|
328
|
-
}
|
|
329
|
-
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 2rem 0 0.8rem; }
|
|
330
|
-
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); margin-top: 0.2rem; }
|
|
331
|
-
h2 { font-size: 1.45rem; }
|
|
332
|
-
h3 { font-size: 1.15rem; }
|
|
333
|
-
p, ul, ol, pre, table, blockquote { margin: 1rem 0; }
|
|
334
|
-
ul, ol { padding-left: 1.3rem; }
|
|
335
|
-
li + li { margin-top: 0.35rem; }
|
|
336
|
-
img { max-width: 100%; height: auto; border-radius: 12px; }
|
|
337
|
-
pre, code { font-family: "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace; }
|
|
338
|
-
code {
|
|
339
|
-
background: var(--code-bg);
|
|
340
|
-
border-radius: 0.35rem;
|
|
341
|
-
padding: 0.12rem 0.35rem;
|
|
342
|
-
font-size: 0.9em;
|
|
343
|
-
}
|
|
344
|
-
pre {
|
|
345
|
-
background: #201c17;
|
|
346
|
-
color: #f8f3ea;
|
|
347
|
-
padding: 1rem 1.15rem;
|
|
348
|
-
border-radius: 14px;
|
|
349
|
-
overflow-x: auto;
|
|
350
|
-
}
|
|
351
|
-
pre code { background: transparent; padding: 0; color: inherit; }
|
|
352
|
-
blockquote {
|
|
353
|
-
margin-left: 0;
|
|
354
|
-
padding: 0.2rem 0 0.2rem 1rem;
|
|
355
|
-
border-left: 3px solid var(--border);
|
|
356
|
-
color: var(--quote);
|
|
357
|
-
}
|
|
358
|
-
table {
|
|
359
|
-
width: 100%;
|
|
360
|
-
border-collapse: collapse;
|
|
361
|
-
font-size: 0.95rem;
|
|
362
|
-
}
|
|
363
|
-
th, td {
|
|
364
|
-
text-align: left;
|
|
365
|
-
border-bottom: 1px solid var(--border);
|
|
366
|
-
padding: 0.6rem 0.4rem;
|
|
367
|
-
}
|
|
368
|
-
hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
|
|
369
|
-
.catalog-page {
|
|
370
|
-
margin-top: 2rem;
|
|
371
|
-
}
|
|
372
|
-
.catalog-page__body > :last-child {
|
|
373
|
-
margin-bottom: 0;
|
|
374
|
-
}
|
|
375
|
-
.catalog-list {
|
|
376
|
-
margin-top: 1rem;
|
|
377
|
-
display: grid;
|
|
378
|
-
gap: 0.9rem;
|
|
379
|
-
}
|
|
380
|
-
.catalog-item {
|
|
381
|
-
display: block;
|
|
382
|
-
text-decoration: none;
|
|
383
|
-
}
|
|
384
|
-
.catalog-item__title {
|
|
385
|
-
display: block;
|
|
386
|
-
color: var(--text);
|
|
387
|
-
font-size: 1.05rem;
|
|
388
|
-
}
|
|
389
|
-
.catalog-item__detail {
|
|
390
|
-
display: block;
|
|
391
|
-
margin-top: 0.35rem;
|
|
392
|
-
color: var(--muted);
|
|
393
|
-
font-size: 0.92rem;
|
|
394
|
-
}
|
|
395
|
-
.catalog-item {
|
|
396
|
-
padding: 0.95rem 0;
|
|
397
|
-
border-top: 1px solid var(--border);
|
|
398
|
-
}
|
|
399
|
-
.catalog-list > .catalog-item:first-child {
|
|
400
|
-
border-top: 0;
|
|
401
|
-
padding-top: 0;
|
|
402
|
-
}
|
|
403
|
-
.catalog-item:hover {
|
|
404
|
-
text-decoration: none;
|
|
405
|
-
}
|
|
406
|
-
.catalog-load-more {
|
|
407
|
-
margin-top: 1.2rem;
|
|
408
|
-
}
|
|
409
|
-
.catalog-load-more__button {
|
|
410
|
-
appearance: none;
|
|
411
|
-
border: 1px solid var(--border);
|
|
412
|
-
background: var(--surface);
|
|
413
|
-
color: var(--text);
|
|
414
|
-
border-radius: 999px;
|
|
415
|
-
padding: 0.65rem 1rem;
|
|
416
|
-
font: inherit;
|
|
417
|
-
font-size: 0.95rem;
|
|
418
|
-
cursor: pointer;
|
|
419
|
-
}
|
|
420
|
-
.catalog-load-more__button:hover {
|
|
421
|
-
background: color-mix(in srgb, var(--surface) 86%, var(--code-bg) 14%);
|
|
422
|
-
}
|
|
423
|
-
.catalog-load-more__button:disabled {
|
|
424
|
-
cursor: wait;
|
|
425
|
-
opacity: 0.7;
|
|
426
|
-
}
|
|
427
|
-
@media (max-width: 720px) {
|
|
428
|
-
html { font-size: 17px; }
|
|
429
|
-
.site-header, main, .site-footer { padding-left: 1rem; padding-right: 1rem; }
|
|
430
|
-
.site-header__inner {
|
|
431
|
-
grid-template-columns: 1fr;
|
|
432
|
-
align-items: start;
|
|
433
|
-
}
|
|
434
|
-
.site-nav {
|
|
435
|
-
margin-top: 0.8rem;
|
|
436
|
-
padding-top: 0.8rem;
|
|
437
|
-
border-top: 1px solid var(--border);
|
|
438
|
-
}
|
|
439
|
-
.site-nav ul { margin-top: 0; }
|
|
440
|
-
.site-nav ul { justify-content: flex-start; }
|
|
441
|
-
article { padding: 1.3rem; border-radius: 16px; }
|
|
442
|
-
}
|
|
443
|
-
|
|
444
121
|
`.trim();
|
|
445
122
|
}
|
|
446
123
|
function buildAtlasThemeStyles() {
|
|
@@ -753,322 +430,5 @@ hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
|
|
|
753
430
|
.site-nav ul { justify-content: flex-start; }
|
|
754
431
|
article { padding: 1.3rem; border-radius: 18px; }
|
|
755
432
|
}
|
|
756
|
-
|
|
757
|
-
`.trim();
|
|
758
|
-
}
|
|
759
|
-
function buildGazetteThemeStyles() {
|
|
760
|
-
return `
|
|
761
|
-
:root {
|
|
762
|
-
color-scheme: light;
|
|
763
|
-
--bg: #f3eee6;
|
|
764
|
-
--surface: #fffdf8;
|
|
765
|
-
--surface-alt: #efe7db;
|
|
766
|
-
--text: #1b1712;
|
|
767
|
-
--muted: #736558;
|
|
768
|
-
--border: #d8c9b7;
|
|
769
|
-
--link: #8a2d12;
|
|
770
|
-
--link-hover: #5f1d0c;
|
|
771
|
-
--code-bg: #f0e3d0;
|
|
772
|
-
--max: 54rem;
|
|
773
|
-
}
|
|
774
|
-
* { box-sizing: border-box; }
|
|
775
|
-
html { font-size: 18px; }
|
|
776
|
-
body {
|
|
777
|
-
margin: 0;
|
|
778
|
-
background:
|
|
779
|
-
linear-gradient(180deg, rgba(255,255,255,0.72), transparent 20%),
|
|
780
|
-
radial-gradient(circle at 100% 0, rgba(177, 109, 68, 0.08), transparent 35%),
|
|
781
|
-
var(--bg);
|
|
782
|
-
color: var(--text);
|
|
783
|
-
font-family: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
|
|
784
|
-
line-height: 1.75;
|
|
785
|
-
}
|
|
786
|
-
a { color: var(--link); text-decoration-thickness: 0.08em; text-underline-offset: 0.14em; }
|
|
787
|
-
a:hover { color: var(--link-hover); }
|
|
788
|
-
.site-header {
|
|
789
|
-
max-width: calc(var(--max) + 6rem);
|
|
790
|
-
margin: 0 auto;
|
|
791
|
-
padding: 1.25rem 2rem 0;
|
|
792
|
-
}
|
|
793
|
-
.site-header__inner {
|
|
794
|
-
display: grid;
|
|
795
|
-
grid-template-columns: minmax(0, 1fr) auto;
|
|
796
|
-
gap: 0.75rem 2rem;
|
|
797
|
-
align-items: end;
|
|
798
|
-
}
|
|
799
|
-
.site-header__brand { min-width: 0; }
|
|
800
|
-
.site-header__title { margin: 0; }
|
|
801
|
-
.site-header__brand span {
|
|
802
|
-
display: block;
|
|
803
|
-
margin-top: 0.3rem;
|
|
804
|
-
color: var(--muted);
|
|
805
|
-
font-size: 0.95rem;
|
|
806
|
-
max-width: 34rem;
|
|
807
|
-
}
|
|
808
|
-
.site-header__title a {
|
|
809
|
-
color: var(--text);
|
|
810
|
-
text-decoration: none;
|
|
811
|
-
font-weight: 800;
|
|
812
|
-
letter-spacing: 0.12em;
|
|
813
|
-
text-transform: uppercase;
|
|
814
|
-
font-size: 0.82rem;
|
|
815
|
-
}
|
|
816
|
-
.site-header__logo {
|
|
817
|
-
display: inline-flex;
|
|
818
|
-
align-items: center;
|
|
819
|
-
margin-right: 0.55rem;
|
|
820
|
-
vertical-align: middle;
|
|
821
|
-
}
|
|
822
|
-
.site-header__logo img {
|
|
823
|
-
display: block;
|
|
824
|
-
width: 1.45rem;
|
|
825
|
-
height: 1.45rem;
|
|
826
|
-
object-fit: contain;
|
|
827
|
-
}
|
|
828
|
-
.site-nav ul {
|
|
829
|
-
list-style: none;
|
|
830
|
-
display: flex;
|
|
831
|
-
align-items: center;
|
|
832
|
-
flex-wrap: wrap;
|
|
833
|
-
gap: 0.9rem;
|
|
834
|
-
margin: 0;
|
|
835
|
-
padding: 0;
|
|
836
|
-
}
|
|
837
|
-
.site-nav {
|
|
838
|
-
min-width: 0;
|
|
839
|
-
}
|
|
840
|
-
.site-nav li {
|
|
841
|
-
display: flex;
|
|
842
|
-
align-items: center;
|
|
843
|
-
margin: 0;
|
|
844
|
-
}
|
|
845
|
-
.site-nav li + li {
|
|
846
|
-
margin-top: 0;
|
|
847
|
-
}
|
|
848
|
-
.site-nav a {
|
|
849
|
-
display: inline-flex;
|
|
850
|
-
align-items: center;
|
|
851
|
-
min-height: 2rem;
|
|
852
|
-
text-transform: none;
|
|
853
|
-
letter-spacing: 0;
|
|
854
|
-
font-size: 0.95rem;
|
|
855
|
-
}
|
|
856
|
-
main {
|
|
857
|
-
max-width: calc(var(--max) + 6rem);
|
|
858
|
-
margin: 0 auto;
|
|
859
|
-
padding: 1.4rem 2rem 4rem;
|
|
860
|
-
}
|
|
861
|
-
.site-footer {
|
|
862
|
-
max-width: calc(var(--max) + 6rem);
|
|
863
|
-
margin: 0 auto;
|
|
864
|
-
padding: 0 2rem 2.5rem;
|
|
865
|
-
}
|
|
866
|
-
.site-footer__inner {
|
|
867
|
-
border-top: 1px solid var(--border);
|
|
868
|
-
padding-top: 1rem;
|
|
869
|
-
color: var(--muted);
|
|
870
|
-
}
|
|
871
|
-
.site-footer__meta {
|
|
872
|
-
margin-top: 0.95rem;
|
|
873
|
-
display: flex;
|
|
874
|
-
align-items: center;
|
|
875
|
-
justify-content: space-between;
|
|
876
|
-
gap: 1rem;
|
|
877
|
-
}
|
|
878
|
-
.site-footer__actions {
|
|
879
|
-
display: inline-flex;
|
|
880
|
-
align-items: center;
|
|
881
|
-
gap: 0.9rem;
|
|
882
|
-
flex-wrap: wrap;
|
|
883
|
-
}
|
|
884
|
-
.site-footer__nav ul,
|
|
885
|
-
.site-footer__social {
|
|
886
|
-
list-style: none;
|
|
887
|
-
display: flex;
|
|
888
|
-
flex-wrap: wrap;
|
|
889
|
-
gap: 0.9rem;
|
|
890
|
-
margin: 0;
|
|
891
|
-
padding: 0;
|
|
892
|
-
}
|
|
893
|
-
.site-footer__nav li,
|
|
894
|
-
.site-footer__social li {
|
|
895
|
-
margin: 0;
|
|
896
|
-
}
|
|
897
|
-
.site-footer__social {
|
|
898
|
-
margin-top: 0.95rem;
|
|
899
|
-
}
|
|
900
|
-
.site-footer__social a {
|
|
901
|
-
display: inline-flex;
|
|
902
|
-
align-items: center;
|
|
903
|
-
justify-content: center;
|
|
904
|
-
width: 2rem;
|
|
905
|
-
height: 2rem;
|
|
906
|
-
color: var(--muted);
|
|
907
|
-
}
|
|
908
|
-
.site-footer__social svg {
|
|
909
|
-
width: 1rem;
|
|
910
|
-
height: 1rem;
|
|
911
|
-
fill: currentColor;
|
|
912
|
-
}
|
|
913
|
-
.site-footer__social-label {
|
|
914
|
-
font-size: 0.82rem;
|
|
915
|
-
font-weight: 700;
|
|
916
|
-
}
|
|
917
|
-
.site-footer__text,
|
|
918
|
-
.site-footer__edit-link,
|
|
919
|
-
.site-footer__markdown-link {
|
|
920
|
-
display: block;
|
|
921
|
-
margin-top: 0.9rem;
|
|
922
|
-
}
|
|
923
|
-
.site-footer__edit-link,
|
|
924
|
-
.site-footer__markdown-link {
|
|
925
|
-
display: inline-block;
|
|
926
|
-
margin-top: 0;
|
|
927
|
-
font-size: 0.78rem;
|
|
928
|
-
color: var(--muted);
|
|
929
|
-
opacity: 0.72;
|
|
930
|
-
}
|
|
931
|
-
@media (max-width: 720px) {
|
|
932
|
-
.site-footer__meta {
|
|
933
|
-
flex-direction: column;
|
|
934
|
-
align-items: flex-start;
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
article {
|
|
938
|
-
background:
|
|
939
|
-
linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,253,248,0.98)),
|
|
940
|
-
var(--surface);
|
|
941
|
-
border: 1px solid var(--border);
|
|
942
|
-
border-radius: 10px;
|
|
943
|
-
padding: 2.6rem 2.4rem 2.4rem;
|
|
944
|
-
box-shadow: 0 18px 44px rgba(45, 29, 16, 0.08);
|
|
945
|
-
position: relative;
|
|
946
|
-
}
|
|
947
|
-
article::before {
|
|
948
|
-
content: "";
|
|
949
|
-
position: absolute;
|
|
950
|
-
inset: 0;
|
|
951
|
-
border-top: 5px solid #b7673c;
|
|
952
|
-
border-radius: 10px;
|
|
953
|
-
pointer-events: none;
|
|
954
|
-
}
|
|
955
|
-
article > p:first-child {
|
|
956
|
-
margin-top: 0;
|
|
957
|
-
color: var(--muted);
|
|
958
|
-
font-size: 0.88rem;
|
|
959
|
-
font-weight: 600;
|
|
960
|
-
}
|
|
961
|
-
h1, h2, h3, h4 {
|
|
962
|
-
font-family: "Iowan Old Style", Charter, Georgia, serif;
|
|
963
|
-
line-height: 1.08;
|
|
964
|
-
letter-spacing: -0.03em;
|
|
965
|
-
margin: 2rem 0 0.8rem;
|
|
966
|
-
}
|
|
967
|
-
h1 { font-size: clamp(2.4rem, 5vw, 4.1rem); margin-top: 0.2rem; }
|
|
968
|
-
h2 { font-size: 1.6rem; }
|
|
969
|
-
h3 { font-size: 1.16rem; }
|
|
970
|
-
p, ul, ol, pre, table, blockquote { margin: 1rem 0; }
|
|
971
|
-
ul, ol { padding-left: 1.35rem; }
|
|
972
|
-
li + li { margin-top: 0.35rem; }
|
|
973
|
-
img { max-width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--border); }
|
|
974
|
-
pre, code { font-family: "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace; }
|
|
975
|
-
code {
|
|
976
|
-
background: var(--code-bg);
|
|
977
|
-
border-radius: 0.3rem;
|
|
978
|
-
padding: 0.12rem 0.35rem;
|
|
979
|
-
font-size: 0.88em;
|
|
980
|
-
}
|
|
981
|
-
pre {
|
|
982
|
-
background: #231a14;
|
|
983
|
-
color: #fff6eb;
|
|
984
|
-
padding: 1rem 1.1rem;
|
|
985
|
-
border-radius: 10px;
|
|
986
|
-
overflow-x: auto;
|
|
987
|
-
}
|
|
988
|
-
pre code { background: transparent; padding: 0; color: inherit; }
|
|
989
|
-
blockquote {
|
|
990
|
-
margin-left: 0;
|
|
991
|
-
padding: 0.1rem 0 0.1rem 1rem;
|
|
992
|
-
border-left: 3px solid #b7673c;
|
|
993
|
-
color: var(--muted);
|
|
994
|
-
font-style: italic;
|
|
995
|
-
}
|
|
996
|
-
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
|
|
997
|
-
th, td { text-align: left; border-bottom: 1px solid var(--border); padding: 0.7rem 0.45rem; }
|
|
998
|
-
hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
|
|
999
|
-
.catalog-page {
|
|
1000
|
-
margin-top: 2rem;
|
|
1001
|
-
}
|
|
1002
|
-
.catalog-page__body > :last-child {
|
|
1003
|
-
margin-bottom: 0;
|
|
1004
|
-
}
|
|
1005
|
-
.catalog-list {
|
|
1006
|
-
margin-top: 1rem;
|
|
1007
|
-
display: grid;
|
|
1008
|
-
gap: 0.9rem;
|
|
1009
|
-
}
|
|
1010
|
-
.catalog-item {
|
|
1011
|
-
display: block;
|
|
1012
|
-
text-decoration: none;
|
|
1013
|
-
}
|
|
1014
|
-
.catalog-item__title {
|
|
1015
|
-
display: block;
|
|
1016
|
-
color: var(--text);
|
|
1017
|
-
font-size: 1.08rem;
|
|
1018
|
-
}
|
|
1019
|
-
.catalog-item__detail {
|
|
1020
|
-
display: block;
|
|
1021
|
-
margin-top: 0.4rem;
|
|
1022
|
-
color: var(--muted);
|
|
1023
|
-
font-size: 0.93rem;
|
|
1024
|
-
}
|
|
1025
|
-
.catalog-item {
|
|
1026
|
-
padding: 0.95rem 0 0.05rem;
|
|
1027
|
-
border-top: 1px solid var(--border);
|
|
1028
|
-
}
|
|
1029
|
-
.catalog-list > .catalog-item:first-child {
|
|
1030
|
-
border-top: 0;
|
|
1031
|
-
padding-top: 0;
|
|
1032
|
-
}
|
|
1033
|
-
.catalog-item:hover {
|
|
1034
|
-
text-decoration: none;
|
|
1035
|
-
}
|
|
1036
|
-
.catalog-load-more {
|
|
1037
|
-
margin-top: 1.2rem;
|
|
1038
|
-
}
|
|
1039
|
-
.catalog-load-more__button {
|
|
1040
|
-
appearance: none;
|
|
1041
|
-
border: 1px solid var(--border);
|
|
1042
|
-
background: var(--surface);
|
|
1043
|
-
color: var(--text);
|
|
1044
|
-
border-radius: 999px;
|
|
1045
|
-
padding: 0.65rem 1rem;
|
|
1046
|
-
font: inherit;
|
|
1047
|
-
font-size: 0.95rem;
|
|
1048
|
-
cursor: pointer;
|
|
1049
|
-
}
|
|
1050
|
-
.catalog-load-more__button:hover {
|
|
1051
|
-
background: color-mix(in srgb, var(--surface) 84%, #fff 16%);
|
|
1052
|
-
}
|
|
1053
|
-
.catalog-load-more__button:disabled {
|
|
1054
|
-
cursor: wait;
|
|
1055
|
-
opacity: 0.7;
|
|
1056
|
-
}
|
|
1057
|
-
@media (max-width: 720px) {
|
|
1058
|
-
html { font-size: 17px; }
|
|
1059
|
-
.site-header, main, .site-footer { padding-left: 1rem; padding-right: 1rem; }
|
|
1060
|
-
.site-header__inner {
|
|
1061
|
-
grid-template-columns: 1fr;
|
|
1062
|
-
align-items: start;
|
|
1063
|
-
}
|
|
1064
|
-
.site-nav {
|
|
1065
|
-
margin-top: 0.8rem;
|
|
1066
|
-
padding-top: 0.8rem;
|
|
1067
|
-
border-top: 1px solid var(--border);
|
|
1068
|
-
}
|
|
1069
|
-
.site-nav ul { justify-content: flex-start; }
|
|
1070
|
-
article { padding: 1.35rem 1.2rem 1.25rem; }
|
|
1071
|
-
}
|
|
1072
|
-
|
|
1073
433
|
`.trim();
|
|
1074
434
|
}
|
package/dist/index-builder.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readdir, readFile, realpath, stat, writeFile } from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { applyIndexTransforms } from './core/extensions.js';
|
|
4
|
+
import { isIgnoredContentName } from './core/content-store.js';
|
|
4
5
|
import { inferDirectoryContentType } from './core/content-type.js';
|
|
5
6
|
import { getDirectoryIndexCandidates } from './core/directory-index.js';
|
|
6
7
|
import { getDocumentSummary, getDocumentTitle, parseMarkdownDocument, } from './core/markdown.js';
|
|
@@ -72,7 +73,7 @@ export async function buildManagedIndexBlock(directoryPath, plugins = []) {
|
|
|
72
73
|
const directories = [];
|
|
73
74
|
const articles = [];
|
|
74
75
|
for (const entry of entries) {
|
|
75
|
-
if (entry.name
|
|
76
|
+
if (isIgnoredContentName(entry.name)) {
|
|
76
77
|
continue;
|
|
77
78
|
}
|
|
78
79
|
const fullPath = path.join(directoryPath, entry.name);
|
|
@@ -208,7 +209,7 @@ async function listDirectoriesRecursivelyInternal(rootDir, visitedRealDirectorie
|
|
|
208
209
|
const entries = await readdir(rootDir, { withFileTypes: true });
|
|
209
210
|
const rootShape = await inspectDirectoryShape(rootDir);
|
|
210
211
|
for (const entry of entries) {
|
|
211
|
-
if (entry.name
|
|
212
|
+
if (isIgnoredContentName(entry.name)) {
|
|
212
213
|
continue;
|
|
213
214
|
}
|
|
214
215
|
if (rootShape.hasSkillIndex && isIgnoredSkillSupportDirectory(entry.name)) {
|
|
@@ -255,7 +256,7 @@ async function hasMeaningfulDirectoryContent(directoryPath, visitedRealDirectori
|
|
|
255
256
|
}
|
|
256
257
|
const entries = await readdir(directoryPath, { withFileTypes: true });
|
|
257
258
|
for (const entry of entries) {
|
|
258
|
-
if (entry.name
|
|
259
|
+
if (isIgnoredContentName(entry.name)) {
|
|
259
260
|
continue;
|
|
260
261
|
}
|
|
261
262
|
if (shape.hasSkillIndex && isIgnoredSkillSupportDirectory(entry.name)) {
|
|
@@ -279,7 +280,7 @@ async function inspectDirectoryShape(directoryPath) {
|
|
|
279
280
|
let hasExtraMarkdownFiles = false;
|
|
280
281
|
let hasAssetFiles = false;
|
|
281
282
|
for (const entry of entries) {
|
|
282
|
-
if (entry.name
|
|
283
|
+
if (isIgnoredContentName(entry.name)) {
|
|
283
284
|
continue;
|
|
284
285
|
}
|
|
285
286
|
const fullPath = path.join(directoryPath, entry.name);
|
package/dist/search.js
CHANGED
|
@@ -3,6 +3,7 @@ import path from 'node:path';
|
|
|
3
3
|
import { inferDirectoryContentType } from './core/content-type.js';
|
|
4
4
|
import { getDirectoryIndexCandidates } from './core/directory-index.js';
|
|
5
5
|
import { getDocumentSummary, getDocumentTitle, parseMarkdownDocument, } from './core/markdown.js';
|
|
6
|
+
import { isIgnoredContentName } from './core/content-store.js';
|
|
6
7
|
export async function buildSearchBundle(options) {
|
|
7
8
|
const buildModule = await loadIndexbindBuildModule();
|
|
8
9
|
const rootDir = path.resolve(options.rootDir);
|
|
@@ -102,7 +103,7 @@ async function walkDirectory(absoluteDirectoryPath, relativeDirectoryPath, visit
|
|
|
102
103
|
results.push(indexFile);
|
|
103
104
|
}
|
|
104
105
|
for (const entry of entries) {
|
|
105
|
-
if (entry.name
|
|
106
|
+
if (isIgnoredContentName(entry.name)) {
|
|
106
107
|
continue;
|
|
107
108
|
}
|
|
108
109
|
const absoluteEntryPath = path.join(absoluteDirectoryPath, entry.name);
|
|
@@ -160,7 +161,7 @@ async function inspectDirectoryShape(directoryPath) {
|
|
|
160
161
|
let hasExtraMarkdownFiles = false;
|
|
161
162
|
let hasAssetFiles = false;
|
|
162
163
|
for (const entry of entries) {
|
|
163
|
-
if (entry.name
|
|
164
|
+
if (isIgnoredContentName(entry.name)) {
|
|
164
165
|
continue;
|
|
165
166
|
}
|
|
166
167
|
const absoluteEntryPath = path.join(directoryPath, entry.name);
|