This is the source code for the Karavela website, built with Next.js, Tailwind CSS, and Sanity.
To get started with this template, first install the npm dependencies:
npm installPopulate the .env.local file with the appropriate credentials (contact the website administrator for these).
The .env.local file should look like this:
NEXT_PUBLIC_SANITY_PROJECT_ID=project_id
NEXT_PUBLIC_SANITY_DATASET=production
SMTP_USERNAME=username
SMTP_PASSWORD=password
CONTACT_EMAIL=email_which_will_receive_contact_form_submissions
Next, create a new Sanity project to power the blog within this template:
npm create sanity@latest -- --env=.env.local --create-project "Karavela Blog" --dataset productionThis will prompt you to create a new Sanity account if you don't have one already. When asked "Would you like to add configuration files for a Sanity project in this Next.js folder?", choose "n".
Next, run the development server:
npm run devFinally, open http://localhost:3000 in your browser to view the website.
To manage your blog content, visit the embedded Sanity Studio at http://localhost:3000/studio.
Test building the website locally with:
npm run build
npm run startYou can then deploy the website to Vercel by pushing your code to the dev, staging or main branches of your GitHub repository. Make sure to set the environment variables in your Vercel project settings.