= {},
-): Plugin {
+) {
const pluginOptions = { ...defaultOptions, ...options };
let builder: Builder;
@@ -30,7 +30,7 @@ export default function contentCollectionsPlugin(
return {
name: "content-collections",
- config(config) {
+ config(config: any) {
isEnabled = options.isEnabled ? options.isEnabled(config) : true;
// even if the plugin is disabled, we need to configure the alias
@@ -67,7 +67,8 @@ export default function contentCollectionsPlugin(
};
}
- return configPatch;
+ // we cast to any here to avoid type mismatches with different vite versions
+ return configPatch as any;
},
async configResolved(config: any) {
@@ -103,5 +104,5 @@ export default function contentCollectionsPlugin(
builder.watch();
return;
},
- };
+ } satisfies Plugin;
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 270f1386..6f13881e 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -742,18 +742,24 @@ importers:
'@content-collections/markdown':
specifier: 0.1.1
version: link:../../packages/markdown
+ '@content-collections/sample-theme':
+ specifier: 0.1.0
+ version: link:../../utils/sample-theme
'@content-collections/solid-start':
specifier: 0.1.2
version: link:../../packages/solid-start
+ '@solidjs/router':
+ specifier: ^0.14.3
+ version: 0.14.3(solid-js@1.8.22)
'@solidjs/start':
- specifier: ^1.0.0-rc.0
- version: 1.0.0-rc.1(solid-js@1.8.17)(vinxi@0.4.1)(vite@5.4.6)
+ specifier: ^1.0.6
+ version: 1.0.6(solid-js@1.8.22)(vinxi@0.4.2)(vite@5.4.6)
solid-js:
- specifier: ^1.8.16
- version: 1.8.17
+ specifier: ^1.8.22
+ version: 1.8.22
vinxi:
- specifier: ^0.4.1
- version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.9)
+ specifier: ^0.4.2
+ version: 0.4.2(@opentelemetry/api@1.8.0)(@types/node@20.14.9)
samples/svelte-kit:
devDependencies:
@@ -1199,6 +1205,14 @@ packages:
dependencies:
'@babel/types': 7.25.4
+ /@babel/parser@7.25.6:
+ resolution: {integrity: sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==}
+ engines: {node: '>=6.0.0'}
+ hasBin: true
+ dependencies:
+ '@babel/types': 7.25.6
+ dev: false
+
/@babel/plugin-syntax-decorators@7.24.1(@babel/core@7.24.5):
resolution: {integrity: sha512-05RJdO/cCrtVWuAaSn1tS3bH8jbsJa/Y1uD186u6J4C/1mnHFxseeuWpsqr9anvo7TUulev7tm7GDwRV+VuhDw==}
engines: {node: '>=6.9.0'}
@@ -1347,6 +1361,15 @@ packages:
'@babel/helper-validator-identifier': 7.24.7
to-fast-properties: 2.0.0
+ /@babel/types@7.25.6:
+ resolution: {integrity: sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==}
+ engines: {node: '>=6.9.0'}
+ dependencies:
+ '@babel/helper-string-parser': 7.24.8
+ '@babel/helper-validator-identifier': 7.24.7
+ to-fast-properties: 2.0.0
+ dev: false
+
/@bcoe/v8-coverage@0.2.3:
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
dev: true
@@ -5650,12 +5673,20 @@ packages:
engines: {node: '>=18'}
dev: false
- /@solidjs/start@1.0.0-rc.1(solid-js@1.8.17)(vinxi@0.4.1)(vite@5.4.6):
- resolution: {integrity: sha512-82VzbFDunj7rZsRQl/p5JXFQRtp4OdPtE5KLspck7amLYjVeRLdkveCNLOko5mcwLsft2hSHgN698KUbaW3rRA==}
+ /@solidjs/router@0.14.3(solid-js@1.8.22):
+ resolution: {integrity: sha512-9p4k4zL2baK/1XRQALbFcaQ4IikjkWmxqYQtFqLzjONUejhL1uqJHtzxB4tZjmNqtRANVRnTDbJfzjvaD9k+pQ==}
+ peerDependencies:
+ solid-js: ^1.8.6
+ dependencies:
+ solid-js: 1.8.22
+ dev: false
+
+ /@solidjs/start@1.0.6(solid-js@1.8.22)(vinxi@0.4.2)(vite@5.4.6):
+ resolution: {integrity: sha512-O5knaeqDBx+nKLJRm5ZJurnXZtIYBOwOreQ10APaVtVjKIKKRC5HxJ1Kwqg7atOQNNDgsF0pzhW218KseaZ1UA==}
dependencies:
- '@vinxi/plugin-directives': 0.3.1(vinxi@0.4.1)
- '@vinxi/server-components': 0.3.3(vinxi@0.4.1)
- '@vinxi/server-functions': 0.3.2(vinxi@0.4.1)
+ '@vinxi/plugin-directives': 0.4.2(vinxi@0.4.2)
+ '@vinxi/server-components': 0.4.2(vinxi@0.4.2)
+ '@vinxi/server-functions': 0.4.2(vinxi@0.4.2)
defu: 6.1.4
error-stack-parser: 2.1.4
glob: 10.3.12
@@ -5665,9 +5696,9 @@ packages:
seroval-plugins: 1.0.5(seroval@1.0.5)
shikiji: 0.9.19
source-map-js: 1.2.0
- terracotta: 1.0.5(solid-js@1.8.17)
+ terracotta: 1.0.5(solid-js@1.8.22)
vite-plugin-inspect: 0.7.42(vite@5.4.6)
- vite-plugin-solid: 2.10.2(solid-js@1.8.17)(vite@5.4.6)
+ vite-plugin-solid: 2.10.2(solid-js@1.8.22)(vite@5.4.6)
transitivePeerDependencies:
- '@nuxt/kit'
- '@testing-library/jest-dom'
@@ -6387,51 +6418,51 @@ packages:
- uWebSockets.js
dev: false
- /@vinxi/plugin-directives@0.3.1(vinxi@0.4.1):
- resolution: {integrity: sha512-4qz5WifjmJ864VS8Ik9nUG0wAkt/xIcxFpP29RXogGLgccRnceBpWQi+ghw5rm0F6LP/YMAhhO5iFORXclWd0Q==}
+ /@vinxi/plugin-directives@0.4.2(vinxi@0.4.2):
+ resolution: {integrity: sha512-lQuKA6Bc6z3tGmqDTSyR2CC0aSOMc0nBlHmk+5HoROSJ9Lp24xVSJjqEyaBNEnUMaq4itw+4w2IGUX7+qoMhJQ==}
peerDependencies:
- vinxi: ^0.3.10
+ vinxi: ^0.4.2
dependencies:
- '@babel/parser': 7.25.4
- acorn: 8.11.3
- acorn-jsx: 5.3.2(acorn@8.11.3)
+ '@babel/parser': 7.25.6
+ acorn: 8.12.1
+ acorn-jsx: 5.3.2(acorn@8.12.1)
acorn-loose: 8.4.0
- acorn-typescript: 1.4.13(acorn@8.11.3)
- astring: 1.8.6
+ acorn-typescript: 1.4.13(acorn@8.12.1)
+ astring: 1.9.0
magicast: 0.2.11
- recast: 0.23.6
+ recast: 0.23.9
tslib: 2.7.0
- vinxi: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.9)
+ vinxi: 0.4.2(@opentelemetry/api@1.8.0)(@types/node@20.14.9)
dev: false
- /@vinxi/server-components@0.3.3(vinxi@0.4.1):
- resolution: {integrity: sha512-xaW92nj9HUMLyswPcCmsIXOsS3TJll0m9u3WEjWjLrtZWheHggina6+kTCSeltp/Qe8WlUfNU5G02Xy8L4xQxA==}
+ /@vinxi/server-components@0.4.2(vinxi@0.4.2):
+ resolution: {integrity: sha512-uQFQjfq7ZYBTYXij7NWQ7aKKH0HvpboLG/Oqxj+f3RNv09dY9xLlD03VdBvgJjx4TtssliGY2rYeFDjkrByVVw==}
peerDependencies:
- vinxi: ^0.3.10
+ vinxi: ^0.4.2
dependencies:
- '@vinxi/plugin-directives': 0.3.1(vinxi@0.4.1)
- acorn: 8.11.3
+ '@vinxi/plugin-directives': 0.4.2(vinxi@0.4.2)
+ acorn: 8.12.1
acorn-loose: 8.4.0
- acorn-typescript: 1.4.13(acorn@8.11.3)
- astring: 1.8.6
+ acorn-typescript: 1.4.13(acorn@8.12.1)
+ astring: 1.9.0
magicast: 0.2.11
- recast: 0.23.6
- vinxi: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.9)
+ recast: 0.23.9
+ vinxi: 0.4.2(@opentelemetry/api@1.8.0)(@types/node@20.14.9)
dev: false
- /@vinxi/server-functions@0.3.2(vinxi@0.4.1):
- resolution: {integrity: sha512-PoARb1X480UE9jysPqltpzginBftna34GmZ3HyvRT+pnPfsGcuHOzZe/a18V/K04qk2yMRd7eeW42JF5O+wunw==}
+ /@vinxi/server-functions@0.4.2(vinxi@0.4.2):
+ resolution: {integrity: sha512-hI6MstgFx5LqR0ZFI2NU7WVBfSuurjD/NmQBE38FC1TY9gOwXCqVXi8aQ/DEUnO5mOGNBE0iPohIUxmsbHfnUQ==}
peerDependencies:
- vinxi: ^0.3.10
+ vinxi: ^0.4.2
dependencies:
- '@vinxi/plugin-directives': 0.3.1(vinxi@0.4.1)
- acorn: 8.11.3
+ '@vinxi/plugin-directives': 0.4.2(vinxi@0.4.2)
+ acorn: 8.12.1
acorn-loose: 8.4.0
- acorn-typescript: 1.4.13(acorn@8.11.3)
- astring: 1.8.6
+ acorn-typescript: 1.4.13(acorn@8.12.1)
+ astring: 1.9.0
magicast: 0.2.11
- recast: 0.23.6
- vinxi: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.9)
+ recast: 0.23.9
+ vinxi: 0.4.2(@opentelemetry/api@1.8.0)(@types/node@20.14.9)
dev: false
/@vitejs/plugin-react@4.3.0(vite@5.4.6):
@@ -6565,19 +6596,27 @@ packages:
dependencies:
acorn: 8.11.3
+ /acorn-jsx@5.3.2(acorn@8.12.1):
+ resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
+ peerDependencies:
+ acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
+ dependencies:
+ acorn: 8.12.1
+ dev: false
+
/acorn-loose@8.4.0:
resolution: {integrity: sha512-M0EUka6rb+QC4l9Z3T0nJEzNOO7JcoJlYMrBlyBCiFSXRyxjLKayd4TbQs2FDRWQU1h9FR7QVNHt+PEaoNL5rQ==}
engines: {node: '>=0.4.0'}
dependencies:
- acorn: 8.11.3
+ acorn: 8.12.1
dev: false
- /acorn-typescript@1.4.13(acorn@8.11.3):
+ /acorn-typescript@1.4.13(acorn@8.12.1):
resolution: {integrity: sha512-xsc9Xv0xlVfwp2o7sQ+GCQ1PgbkdcpWdTzrwXxO3xDMTAywVS3oXVOcOHuRjAPkS4P9b+yc/qNF15460v+jp4Q==}
peerDependencies:
acorn: '>=8.9.0'
dependencies:
- acorn: 8.11.3
+ acorn: 8.12.1
dev: false
/acorn@8.11.3:
@@ -6585,6 +6624,12 @@ packages:
engines: {node: '>=0.4.0'}
hasBin: true
+ /acorn@8.12.1:
+ resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==}
+ engines: {node: '>=0.4.0'}
+ hasBin: true
+ dev: false
+
/agent-base@6.0.2:
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
engines: {node: '>= 6.0.0'}
@@ -6866,6 +6911,11 @@ packages:
resolution: {integrity: sha512-ISvCdHdlTDlH5IpxQJIex7BWBywFWgjJSVdwst+/iQCoEYnyOaQ95+X1JGshuBjGp6nxKUy1jMgE3zPqN7fQdg==}
hasBin: true
+ /astring@1.9.0:
+ resolution: {integrity: sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==}
+ hasBin: true
+ dev: false
+
/async-sema@3.1.1:
resolution: {integrity: sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg==}
dev: false
@@ -8629,7 +8679,7 @@ packages:
eslint: '*'
eslint-plugin-import: '*'
dependencies:
- debug: 4.3.4
+ debug: 4.3.6
enhanced-resolve: 5.16.0
eslint: 8.57.0
eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
@@ -11191,9 +11241,9 @@ packages:
/magicast@0.2.11:
resolution: {integrity: sha512-6saXbRDA1HMkqbsvHOU6HBjCVgZT460qheRkLhJQHWAbhXoWESI3Kn/dGGXyKs15FFKR85jsUqFx2sMK0wy/5g==}
dependencies:
- '@babel/parser': 7.25.4
- '@babel/types': 7.25.4
- recast: 0.23.6
+ '@babel/parser': 7.25.6
+ '@babel/types': 7.25.6
+ recast: 0.23.9
dev: false
/magicast@0.3.4:
@@ -11201,7 +11251,7 @@ packages:
dependencies:
'@babel/parser': 7.25.4
'@babel/types': 7.25.4
- source-map-js: 1.2.1
+ source-map-js: 1.2.0
dev: true
/make-dir@3.1.0:
@@ -13929,8 +13979,8 @@ packages:
dependencies:
picomatch: 2.3.1
- /recast@0.23.6:
- resolution: {integrity: sha512-9FHoNjX1yjuesMwuthAmPKabxYQdOgihFYmT5ebXfYGBcnqXZf3WOVz+5foEZ8Y83P4ZY6yQD5GMmtV+pgCCAQ==}
+ /recast@0.23.9:
+ resolution: {integrity: sha512-Hx/BGIbwj+Des3+xy5uAtAbdCyqK9y9wbBcDFDYanLS9JnMqf7OeF87HQwUimE87OEc72mr6tkKUKMBBL+hF9Q==}
engines: {node: '>= 4'}
dependencies:
ast-types: 0.16.1
@@ -14428,11 +14478,25 @@ packages:
seroval: 1.0.5
dev: false
+ /seroval-plugins@1.1.1(seroval@1.1.1):
+ resolution: {integrity: sha512-qNSy1+nUj7hsCOon7AO4wdAIo9P0jrzAMp18XhiOzA6/uO5TKtP7ScozVJ8T293oRIvi5wyCHSM4TrJo/c/GJA==}
+ engines: {node: '>=10'}
+ peerDependencies:
+ seroval: ^1.0
+ dependencies:
+ seroval: 1.1.1
+ dev: false
+
/seroval@1.0.5:
resolution: {integrity: sha512-TM+Z11tHHvQVQKeNlOUonOWnsNM+2IBwZ4vwoi4j3zKzIpc5IDw8WPwCfcc8F17wy6cBcJGbZbFOR0UCuTZHQA==}
engines: {node: '>=10'}
dev: false
+ /seroval@1.1.1:
+ resolution: {integrity: sha512-rqEO6FZk8mv7Hyv4UCj3FD3b6Waqft605TLfsCe/BiaylRpyyMC0b+uA5TJKawX3KzMrdi3wsLbCaLplrQmBvQ==}
+ engines: {node: '>=10'}
+ dev: false
+
/serve-placeholder@2.0.1:
resolution: {integrity: sha512-rUzLlXk4uPFnbEaIz3SW8VISTxMuONas88nYWjAWaM2W9VDbt9tyFOr3lq8RhVOFrT3XISoBw8vni5una8qMnQ==}
dependencies:
@@ -14629,15 +14693,15 @@ packages:
resolution: {integrity: sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==}
dev: false
- /solid-js@1.8.17:
- resolution: {integrity: sha512-E0FkUgv9sG/gEBWkHr/2XkBluHb1fkrHywUgA6o6XolPDCJ4g1HaLmQufcBBhiF36ee40q+HpG/vCZu7fLpI3Q==}
+ /solid-js@1.8.22:
+ resolution: {integrity: sha512-VBzN5j+9Y4rqIKEnK301aBk+S7fvFSTs9ljg+YEdFxjNjH0hkjXPiQRcws9tE5fUzMznSS6KToL5hwMfHDgpLA==}
dependencies:
csstype: 3.1.3
- seroval: 1.0.5
- seroval-plugins: 1.0.5(seroval@1.0.5)
+ seroval: 1.1.1
+ seroval-plugins: 1.1.1(seroval@1.1.1)
dev: false
- /solid-refresh@0.6.3(solid-js@1.8.17):
+ /solid-refresh@0.6.3(solid-js@1.8.22):
resolution: {integrity: sha512-F3aPsX6hVw9ttm5LYlth8Q15x6MlI/J3Dn+o3EQyRTtTxidepSTwAYdozt01/YA+7ObcciagGEyXIopGZzQtbA==}
peerDependencies:
solid-js: ^1.3
@@ -14645,16 +14709,16 @@ packages:
'@babel/generator': 7.24.5
'@babel/helper-module-imports': 7.24.3
'@babel/types': 7.25.4
- solid-js: 1.8.17
+ solid-js: 1.8.22
dev: false
- /solid-use@0.8.0(solid-js@1.8.17):
+ /solid-use@0.8.0(solid-js@1.8.22):
resolution: {integrity: sha512-YX+XmcKLvSx3bwMimMhFy40ZkDnShnUcEw6cW6fSscwKEgl1TG3GlgAvkBmQ3AeWjvQSd8+HGTr82ImsrjkkqA==}
engines: {node: '>=10'}
peerDependencies:
solid-js: ^1.7
dependencies:
- solid-js: 1.8.17
+ solid-js: 1.8.22
dev: false
/sorcery@0.11.0:
@@ -15225,14 +15289,14 @@ packages:
engines: {node: '>=8'}
dev: true
- /terracotta@1.0.5(solid-js@1.8.17):
+ /terracotta@1.0.5(solid-js@1.8.22):
resolution: {integrity: sha512-4jkpXGKemeWjsBGDoBK1tnovGfIEMM8+Fa99T0TD4VYUaZq6hXHEWMfHshxy1h+DzsanDAwSBIBM0NnOohzijw==}
engines: {node: '>=10'}
peerDependencies:
solid-js: ^1.8
dependencies:
- solid-js: 1.8.17
- solid-use: 0.8.0(solid-js@1.8.17)
+ solid-js: 1.8.22
+ solid-use: 0.8.0(solid-js@1.8.22)
dev: false
/terser@5.31.0:
@@ -16152,8 +16216,8 @@ packages:
unist-util-stringify-position: 4.0.0
vfile-message: 4.0.2
- /vinxi@0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.9):
- resolution: {integrity: sha512-WGEYqIuJ2/P3sBoSVKsGvp/UKpW4wVSaAFdA18gthyMCEExN6nVteoA+Rv1wQFLKXTVL9JRpeGJjcLzcRRgGCA==}
+ /vinxi@0.4.2(@opentelemetry/api@1.8.0)(@types/node@20.14.9):
+ resolution: {integrity: sha512-BbvIum9BLUQ22O/lU1RX0+aKNMXXcl58hofNoWFnFcKkm+efgVsHiD2d7HG3w8QLdb2Asdhmz5/ZzI1Y3zTBXw==}
hasBin: true
dependencies:
'@babel/core': 7.24.5
@@ -16324,7 +16388,7 @@ packages:
- supports-color
dev: false
- /vite-plugin-solid@2.10.2(solid-js@1.8.17)(vite@5.4.6):
+ /vite-plugin-solid@2.10.2(solid-js@1.8.22)(vite@5.4.6):
resolution: {integrity: sha512-AOEtwMe2baBSXMXdo+BUwECC8IFHcKS6WQV/1NEd+Q7vHPap5fmIhLcAzr+DUJ04/KHx/1UBU0l1/GWP+rMAPQ==}
peerDependencies:
'@testing-library/jest-dom': ^5.16.6 || ^5.17.0 || ^6.*
@@ -16338,8 +16402,8 @@ packages:
'@types/babel__core': 7.20.5
babel-preset-solid: 1.8.17(@babel/core@7.24.5)
merge-anything: 5.1.7
- solid-js: 1.8.17
- solid-refresh: 0.6.3(solid-js@1.8.17)
+ solid-js: 1.8.22
+ solid-refresh: 0.6.3(solid-js@1.8.22)
vite: 5.4.6(@types/node@20.14.9)
vitefu: 0.2.5(vite@5.4.6)
transitivePeerDependencies:
@@ -16363,8 +16427,8 @@ packages:
- typescript
dev: true
- /vite@5.4.4(@types/node@20.14.2):
- resolution: {integrity: sha512-RHFCkULitycHVTtelJ6jQLd+KSAAzOgEYorV32R2q++M6COBjKJR6BxqClwp5sf0XaBDjVMuJ9wnNfyAJwjMkA==}
+ /vite@5.4.2(@types/node@20.14.2):
+ resolution: {integrity: sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
peerDependencies:
@@ -16397,13 +16461,13 @@ packages:
'@types/node': 20.14.2
esbuild: 0.21.5
postcss: 8.4.45
- rollup: 4.21.3
+ rollup: 4.21.2
optionalDependencies:
fsevents: 2.3.3
dev: true
- /vite@5.4.4(@types/node@20.14.9):
- resolution: {integrity: sha512-RHFCkULitycHVTtelJ6jQLd+KSAAzOgEYorV32R2q++M6COBjKJR6BxqClwp5sf0XaBDjVMuJ9wnNfyAJwjMkA==}
+ /vite@5.4.2(@types/node@20.14.9):
+ resolution: {integrity: sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
peerDependencies:
@@ -16436,7 +16500,7 @@ packages:
'@types/node': 20.14.9
esbuild: 0.21.5
postcss: 8.4.45
- rollup: 4.21.3
+ rollup: 4.21.2
optionalDependencies:
fsevents: 2.3.3
dev: true
@@ -16609,7 +16673,7 @@ packages:
tinybench: 2.9.0
tinypool: 1.0.1
tinyrainbow: 1.2.0
- vite: 5.4.4(@types/node@20.14.2)
+ vite: 5.4.2(@types/node@20.14.2)
vite-node: 2.0.5(@types/node@20.14.2)
why-is-node-running: 2.3.0
transitivePeerDependencies:
@@ -16666,7 +16730,7 @@ packages:
tinybench: 2.9.0
tinypool: 1.0.1
tinyrainbow: 1.2.0
- vite: 5.4.4(@types/node@20.14.9)
+ vite: 5.4.2(@types/node@20.14.9)
vite-node: 2.0.5(@types/node@20.14.9)
why-is-node-running: 2.3.0
transitivePeerDependencies:
diff --git a/samples/solid/characters/arthur.md b/samples/solid/characters/arthur.md
deleted file mode 100644
index 2c5f3e23..00000000
--- a/samples/solid/characters/arthur.md
+++ /dev/null
@@ -1,8 +0,0 @@
----
-name: Arthur Dent
-origin: Earth
-species: Human
-source: https://hitchhikers.fandom.com/wiki/Arthur_Dent
----
-
-**Arthur Dent** is a friendly but simple-minded human from Earth who escaped his planet's destruction and travelled the universe with his best friend, **Ford Prefect**. He spent several years being helplessly launched from crisis to crisis while trying to straighten out his lifestyle.
diff --git a/samples/solid/characters/ford.md b/samples/solid/characters/ford.md
deleted file mode 100644
index b18aea65..00000000
--- a/samples/solid/characters/ford.md
+++ /dev/null
@@ -1,8 +0,0 @@
----
-name: Ford Prefect
-origin: Betelgeuse V
-species: Betelgeusian
-source: https://hitchhikers.fandom.com/wiki/Ford_Prefect
----
-
-**Ford Prefect** is an adventurous, eccentric, and existentialist Betelgeusian field researcher for The Hitchhiker's Guide to the Galaxy who traveled across the universe with Arthur Dent on many bizarre adventures, primarily as a crewman on the Heart of Gold and the Bistromath.
diff --git a/samples/solid/content-collections.ts b/samples/solid/content-collections.ts
index 6930e011..3e4419fa 100644
--- a/samples/solid/content-collections.ts
+++ b/samples/solid/content-collections.ts
@@ -1,25 +1,25 @@
import { defineCollection, defineConfig } from "@content-collections/core";
import { compileMarkdown } from "@content-collections/markdown";
-const characters = defineCollection({
- name: "characters",
- directory: "characters",
+const posts = defineCollection({
+ name: "posts",
+ directory: "src/content/posts",
include: "*.md",
schema: (z) => ({
- name: z.string().min(1),
- origin: z.string().min(1),
- species: z.string().min(1),
- source: z.string().min(1).url(),
+ title: z.string(),
+ summary: z.string(),
+ date: z.string(),
+ author: z.string(),
}),
- transform: async (document, context) => {
- const content = await compileMarkdown(context, document);
+ transform: async (post, ctx) => {
+ const html = await compileMarkdown(ctx, post);
return {
- ...document,
- content,
+ ...post,
+ html,
};
},
});
export default defineConfig({
- collections: [characters],
+ collections: [posts],
});
diff --git a/samples/solid/package.json b/samples/solid/package.json
index 326e6398..7e053a68 100644
--- a/samples/solid/package.json
+++ b/samples/solid/package.json
@@ -9,10 +9,12 @@
"dependencies": {
"@content-collections/core": "0.7.0",
"@content-collections/markdown": "0.1.1",
+ "@content-collections/sample-theme": "0.1.0",
"@content-collections/solid-start": "0.1.2",
- "@solidjs/start": "^1.0.0-rc.0",
- "solid-js": "^1.8.16",
- "vinxi": "^0.4.1"
+ "@solidjs/router": "^0.14.3",
+ "@solidjs/start": "^1.0.6",
+ "solid-js": "^1.8.22",
+ "vinxi": "^0.4.2"
},
"engines": {
"node": ">=18"
diff --git a/samples/solid/src/app.css b/samples/solid/src/app.css
deleted file mode 100644
index 647cf36e..00000000
--- a/samples/solid/src/app.css
+++ /dev/null
@@ -1,22 +0,0 @@
-body {
- font-family: Gordita, Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
-}
-
-main {
- padding: 1em;
- margin: 0 auto;
-}
-
-h1 {
- color: #335d92;
- text-transform: uppercase;
- font-size: 4rem;
- font-weight: 100;
- line-height: 1.1;
-}
-
-ul {
- list-style: none;
- padding: 0;
- margin: 0;
-}
\ No newline at end of file
diff --git a/samples/solid/src/app.tsx b/samples/solid/src/app.tsx
index b7a68daf..ce44f54c 100644
--- a/samples/solid/src/app.tsx
+++ b/samples/solid/src/app.tsx
@@ -1,19 +1,12 @@
-// @refresh reload
-import { allCharacters } from "content-collections";
-import "./app.css";
+import "@content-collections/sample-theme/sample.css";
+import { Router } from "@solidjs/router";
+import { FileRoutes } from "@solidjs/start/router";
+import { Suspense } from "solid-js";
export default function App() {
return (
-
- Characters
-
- {allCharacters.map((character) => (
- -
-
{character.name}
-
-
- ))}
-
-
+ {props.children}}>
+
+
);
}
diff --git a/samples/solid/src/content/posts/kangaroo.md b/samples/solid/src/content/posts/kangaroo.md
new file mode 100644
index 00000000..c2f290b4
--- /dev/null
+++ b/samples/solid/src/content/posts/kangaroo.md
@@ -0,0 +1,38 @@
+---
+title: "The Day a Kangaroo Borrowed My Camera"
+summary: "Join the ContentCrafter Inc. team on a hilarious adventure where a curious kangaroo borrows a Collector’s camera, leading to a series of amusing challenges and unexpected content. Follow the journey from the quirky encounters in the Australian outback to the meticulous validation process and the creative transformation into a captivating blog post. This lighthearted story showcases the fun and joy in crafting unique content."
+date: 2024-07-21
+author: Emma Johnson
+---
+
+Ever wondered what happens when a kangaroo decides to take up photography? Well, neither did we until one of our Collectors had an unforgettable encounter Down Under. At ContentCrafter Inc., our team is always on the lookout for unique and quirky content, and sometimes, the content finds us in the most unexpected ways. Join us on this hilarious journey where a kangaroo, a meticulous Validator, and a creative Transformer come together to craft a story that’s bound to make you chuckle.
+
+## Hopping into Adventure
+
+Our Collector, Jake, is known for his adventurous spirit and knack for finding the most unusual content. On a sunny day in the Australian outback, Jake was busy capturing the stunning landscape when he felt a gentle tug on his camera strap. To his surprise, a curious kangaroo had taken an interest in his equipment.
+
+Jake, being the ever-curious explorer, decided to see where this interaction would lead. The kangaroo, seemingly fascinated by the camera, began hopping around with it, snapping random photos. From blurry close-ups of its nose to unexpected shots of the surrounding wildlife, the kangaroo’s photography skills were, to say the least, unconventional.
+
+As Jake followed the kangaroo, he encountered a series of amusing challenges. Locals laughed and shared stories of other mischievous kangaroos, while Jake tried to keep up with his new furry friend. Eventually, the kangaroo lost interest and left the camera behind, but not before providing Jake with a collection of the most unique and hilarious photos he had ever seen.
+
+## Validator’s Delight
+
+Back at ContentCrafter HQ, it was time for our Validators to step in. Sarah, known for her eagle eye and attention to detail, was tasked with sorting through the kangaroo’s photographic masterpieces. As she sifted through the images, she couldn’t help but laugh at the absurdity of it all.
+
+“Did this kangaroo really try to take a selfie?” Sarah exclaimed, showing a particularly funny shot to her colleague, Mark.
+
+The Validators faced their own set of challenges, from deciphering the context of each photo to ensuring the quality was up to par. They even had a mini-competition to see who could come up with the funniest caption for each image. Despite the odd content, Sarah and her team managed to validate the photos, ensuring they were ready for the next stage.
+
+## Transforming the Tale
+
+With the validated content in hand, it was time for our Transformers to work their magic. Emma, a creative genius with a flair for the dramatic, took the lead. She was determined to turn the kangaroo’s impromptu photo session into a story that would captivate and amuse ContentCrafter’s audience.
+
+Emma and her team brainstormed a series of wild ideas, from creating a fictional narrative about a kangaroo photographer to developing a children’s book. After much laughter and debate, they settled on a humorous blog post that highlighted the kangaroo’s antics and the unexpected adventure Jake experienced.
+
+The final piece was a blend of witty commentary, amusing captions, and the kangaroo’s best shots. It was a hit, not just with ContentCrafter’s clients, but also with the team, who found immense joy in the creative process.
+
+## Conclusion
+
+At ContentCrafter Inc., every piece of content has a story, and sometimes, the story is as entertaining as the content itself. From Jake’s adventurous spirit to Sarah’s meticulous validation and Emma’s creative transformation, the journey of crafting content is filled with laughter and unexpected moments.
+
+The day a kangaroo borrowed Jake’s camera became a cherished memory and a testament to the joy we find in our work. After all, in the world of content creation, you never know what quirky adventure awaits just around the corner.
diff --git a/samples/solid/src/content/posts/monkey.md b/samples/solid/src/content/posts/monkey.md
new file mode 100644
index 00000000..c2fa3e96
--- /dev/null
+++ b/samples/solid/src/content/posts/monkey.md
@@ -0,0 +1,42 @@
+---
+title: "When a Monkey Hijacked Our Drone"
+summary: "In this hilarious adventure, Jake, a Collector for ContentCrafter Inc., finds himself chasing a mischievous monkey through the jungles of Borneo after it hijacks his drone. The Validators at HQ have a field day sifting through the quirky footage, while the Transformers creatively turn the tale into a captivating and humorous story. This lighthearted narrative showcases the unique and amusing experiences of the team as they navigate their roles in crafting engaging content."
+date: 2024-08-08
+author: "Emily Johnson"
+---
+
+The sun was setting over the lush jungles of Borneo, casting a golden hue over the treetops. Our Collector, Jake, was setting up his drone for an aerial shot of the dense canopy. Little did he know, this would be the beginning of one of the most hilarious and unexpected adventures of his career.
+
+## The Collectors' Adventure: Monkey Business in Borneo
+
+Jake had always been the adventurous type, and his role as a Collector for ContentCrafter Inc. suited him perfectly. He had traveled to the far corners of the earth, from the icy tundras of Siberia to the bustling markets of Marrakech. But nothing could have prepared him for the mischievous monkeys of Borneo.
+
+As Jake launched the drone into the sky, he marveled at the stunning view on his screen. Suddenly, a flash of fur darted across the camera feed. Before he could react, a monkey had leaped from a nearby tree and grabbed the drone mid-air. The screen went black, and Jake stood there, mouth agape, as the monkey disappeared into the jungle with his drone.
+
+Determined not to lose his precious equipment, Jake set off in pursuit. He navigated through the dense foliage, dodging vines and leaping over fallen logs. Along the way, he encountered a group of local children who, upon hearing his predicament, burst into laughter and decided to join the chase.
+
+After what felt like hours, they finally found the monkey perched on a high branch, examining the drone with curious eyes. With the help of the children, Jake managed to coax the monkey down with a banana. The drone was a bit battered but still functional. Jake couldn't help but laugh at the absurdity of the situation and the unique content he had just collected.
+
+## The Validators' Hurdles: The Great Drone Debacle
+
+Back at ContentCrafter HQ, the Validators were in stitches as Jake recounted his tale. Emma, the lead Validator, took the drone and began her meticulous examination. She was known for her attention to detail, and nothing escaped her scrutiny.
+
+As Emma reviewed the footage, she couldn't help but chuckle at the monkey's antics. However, her laughter quickly turned to frustration as she noticed the drone's camera had captured some rather unflattering angles of the monkey's anatomy. "Well, this is certainly unique content," she muttered, trying to keep a straight face.
+
+The Validators worked tirelessly, sifting through hours of footage to find the perfect shots. They debated over the best clips, with humorous exchanges like, "Do we really need a close-up of the monkey's nose?" and "I think this one captures the essence of jungle mischief."
+
+Despite the odd content they sometimes received, the Validators took pride in their work. They knew that their meticulous efforts ensured that only the highest quality content made it to the next stage.
+
+## The Transformers' Magic: Crafting a Jungle Tale
+
+With the validated footage in hand, it was time for the Transformers to work their magic. Sarah, the creative genius of the team, was excited to turn this quirky adventure into a captivating story.
+
+Sarah gathered her team and brainstormed ideas. "How about we frame it as a comedy of errors?" suggested Tom. "Or maybe a heartwarming tale of human-animal interaction?" added Lisa. They tossed around various concepts, each more outlandish than the last, until they finally settled on a humorous narrative that highlighted the monkey's playful nature and Jake's relentless determination.
+
+As they crafted the story, the Transformers added witty dialogues and vivid descriptions to bring the adventure to life. They included scenes of Jake's frantic chase, the children's laughter, and the monkey's curious expressions. The final piece was a delightful blend of humor and heart, showcasing the unique content that ContentCrafter Inc. was known for.
+
+## Conclusion: A Day in the Life of ContentCrafter Inc.
+
+As the team gathered to review the final product, they couldn't help but feel a sense of accomplishment. The journey from collecting to validating to transforming had been filled with laughter, challenges, and creativity. It was a testament to the unique roles each member played and the joy they found in crafting content that captivated and converted.
+
+In the end, the story of "When a Monkey Hijacked Our Drone" became one of ContentCrafter Inc.'s most popular pieces, resonating with audiences around the world. It was a reminder that sometimes, the best content comes from the most unexpected and humorous experiences.
diff --git a/samples/solid/src/content/posts/parrot.md b/samples/solid/src/content/posts/parrot.md
new file mode 100644
index 00000000..4fa727d9
--- /dev/null
+++ b/samples/solid/src/content/posts/parrot.md
@@ -0,0 +1,50 @@
+---
+title: "When a Parrot Became Our Tour Guide"
+summary: "In this humorous and engaging blog post, the team at ContentCrafter Inc. embarks on an adventure in the Amazon rainforest, guided by an unexpected tour guide – a parrot named Polly. The Collectors gather unique content with Polly's help, the Validators face amusing challenges verifying the parrot's contributions, and the Transformers creatively shape the story into captivating content. The post highlights the team's quirky experiences and the joy of crafting content that captivates and converts."
+date: 2024-09-13
+author: Jane Doe
+---
+
+At ContentCrafter Inc., every day is an adventure, but nothing could have prepared us for the day a parrot became our tour guide. It all started when our team of Collectors set off on a journey to the Amazon rainforest, hoping to uncover unique stories and content. Little did they know, they were in for a feathered surprise.
+
+## The Collectors' Adventure: A Feathered Guide
+
+Our Collectors, always up for a challenge, embarked on their latest quest with high spirits. The Amazon was teeming with life, and the team was eager to capture its essence. As they trekked through the dense foliage, they encountered a vibrant parrot perched on a low-hanging branch. To their astonishment, the parrot began mimicking their conversations, much to their amusement.
+
+"Looks like we've got ourselves a new team member!" joked Sarah, one of our seasoned Collectors. The parrot, seemingly understanding, squawked back in agreement.
+
+The parrot, whom they affectionately named "Polly," seemed to know the rainforest like the back of its wing. It led them to hidden waterfalls, guided them away from dangerous paths, and even pointed out rare plants and animals. The team couldn't believe their luck – they had a tour guide who could fly!
+
+However, the adventure wasn't without its mishaps. Polly had a mischievous streak and often led the team into hilarious predicaments. One memorable incident involved Polly leading them to a colony of curious monkeys, who decided to "borrow" the team's equipment. It took hours of negotiation (and a lot of bananas) to retrieve their gear.
+
+Despite the challenges, the Collectors gathered incredible content, thanks to Polly's guidance. They captured stunning photos, recorded fascinating sounds, and documented the unique flora and fauna of the Amazon.
+
+## The Validators' Hurdles: Polly's Peculiar Picks
+
+Back at ContentCrafter HQ, the Validators eagerly awaited the Collectors' return. Their job was to sift through the collected content and ensure its quality. When the Collectors arrived with tales of Polly, the Validators were both intrigued and skeptical.
+
+"Did a parrot really help you find all this?" asked Mark, one of the Validators, raising an eyebrow.
+
+As they began their meticulous review, the Validators encountered some peculiar content. Among the stunning photos and recordings were random squawks and images of Polly's favorite perches. The Validators couldn't help but chuckle at the parrot's contributions.
+
+"Looks like Polly has a knack for photobombing," laughed Emily, another Validator, as she examined a photo of a rare orchid with Polly's beak in the corner.
+
+Despite the oddities, the Validators were impressed with the quality of the content. They worked diligently, verifying the authenticity of each piece and ensuring it met ContentCrafter's high standards. Their attention to detail paid off, and soon, the content was ready for the next stage.
+
+## The Transformers' Magic: Crafting Polly's Tale
+
+With the validated content in hand, it was time for the Transformers to work their magic. This creative team was responsible for shaping the raw material into polished pieces that would captivate ContentCrafter's audience.
+
+The Transformers were inspired by Polly's story and decided to weave it into the content. They brainstormed ideas, some more outlandish than others. At one point, they considered creating a fictional series about Polly's adventures, complete with illustrations and voiceovers.
+
+"Imagine Polly as a superhero, saving the rainforest one squawk at a time!" suggested Jake, one of the Transformers, with a grin.
+
+After much laughter and brainstorming, they settled on a more grounded approach. They crafted engaging blog posts, social media updates, and even a short documentary, all featuring Polly's unique perspective. The final content was a perfect blend of humor, adventure, and education.
+
+## Conclusion: A Feathered Friend and a Job Well Done
+
+As the team at ContentCrafter reflected on their journey, they couldn't help but smile. Polly had not only guided the Collectors through the Amazon but had also brought a touch of whimsy to their work. The adventure had been filled with laughter, challenges, and unforgettable moments.
+
+In the end, the team's efforts paid off. The content they created captivated their audience, drawing them into the heart of the Amazon rainforest. Polly's story became a hit, proving that sometimes, the most unexpected guides can lead to the best adventures.
+
+At ContentCrafter Inc., every piece of content has a story, and this time, it was a story of a parrot who became an unlikely hero. And who knows? Maybe Polly will join the team on their next adventure.
diff --git a/samples/solid/src/entry-server.tsx b/samples/solid/src/entry-server.tsx
index 401eff83..d25250c4 100644
--- a/samples/solid/src/entry-server.tsx
+++ b/samples/solid/src/entry-server.tsx
@@ -12,7 +12,21 @@ export default createHandler(() => (
{assets}
- {children}
+
+ {children}
+
{scripts}