Solid Start
Use Content Collections with Solid Start
The @content-collections/solid-start
package enables easy integration of Content Collections into your SolidStart app. It includes a SolidStart plugin that automatically creates content collections and incorporates them into the build process.
Installation
Install required packages:
We have to install the following packages:
@content-collections/core
@content-collections/solid-start
After installation, we have to add a path alias for the generated collections to the tsconfig.json
:
To enable the content collections plugin we have to add the plugin to the array of vite plugins in the (app.config.ts
):
API
The package exports a single function as the default export. The function takes a single argument, an object with the following properties:
configPath
(optional)
Specifies the path to the Content Collections configuration file. Defaults to content-collections.ts
.