SvelteKit demo site for headless CMS setup with WP + WP REST API. Just for learning / demo purposes.
Live: https://train2lake.vercel.app/
Backend: https://github.com/mandrasch/train2lake-backend-wp
npm install
# Copy .env.example to .env
npm run dev -- --open.env-file.
Setup your own local WordPress, e.g. with DDEV. See for example https://github.com/mandrasch/sveltekit-headless-wp-rest-demo-backend and switch in .env-file to the following:
# .env
PUBLIC_WP_REST_API_DOMAIN=https://sveltekit-headless-wp-rest-demo.ddev.site- Publish backend code as well (WIP)
# Install SvelteKit, JSDoc comment typing by now
# + vitest, playwright prettier
npm create svelte@latest .
npm i
# Prettier support for svelte
npm i -D prettier-plugin-svelte prettier
# Add picocss + SCSS https://joyofcode.xyz/using-pico-css-with-svelte
npm i -D @picocss/pico sass svelte-preprocess
# Gutenberg styles:
npm i -D @wordpress/block-library --save
# Loading spinner:
npm i --D svelte-loading-spinners- Add
.envvalues on Vercel (https://vercel.com/docs/concepts/projects/environment-variables)
Inspired by Bahn zum Berg, check out zuugle.at as well!
Fork of my project https://github.com/mandrasch/sveltekit-headless-wp-rest-demo.
