Probably the stack I am going to use for anything CMS related.
This project uses pnpm. Getting started can be found here.
- Install dependencies
pnpm i
. - Setup a Contentful account.
- Run
cp .env.sample .env
. - Add your Contentful API key and Space ID in the newly created
.env
.- From the dashboard click on the space you want to use.
- Go to
Settings > API Keys
and create a new API key. - Add the new keys to the
.env
.
- Add your Content Type ID to the
.env
as well.- Select
Space > Your Space
. - Create a new entry or click on an existing entry.
- Click on
Info
on the right-hand side. - There should be an option called
Content Type ID
. This goes into your.env
.
- Select
- This project also uses SparkPost for emailing. Starter plan gets you 500 emails for free / month. Getting started with SparkPost can be found here.
- Run
pnpm dev
to start the local development server.
In src/global.d.ts
. BlogData
matches the model that is created in Contentful.
This is setup to deploy to Netlify's Edge. To deploy somewhere else, view Qwik's deployment docs here.
This starter site is configured to deploy to Vercel Edge Functions, which means it will be rendered at an edge location near to your users.
The adaptor will add a new vite.config.ts
within the adaptors/
directory, and a new entry file will be created, such as:
└── adaptors/
└── vercel-edge/
└── vite.config.ts
└── src/
└── entry.vercel-edge.tsx
Additionally, within the package.json
, the build.server
script will be updated with the Vercel Edge build.
To build the application for production, use the build
command, this command will automatically run pnpm build.server
and pnpm build.client
:
pnpm build
To deploy the application for development:
pnpm deploy
Notice that you might need a Vercel account in order to complete this step!
The project is ready to be deployed to Vercel. However, you will need to create a git repository and push the code to it.
You can deploy your site to Vercel either via a Git provider integration or through the Vercel CLI.