This module is still being developed and not ready for production usage yet. There will be many smaller alpha releases the coming weeks, often with breaking changes.
I am working towards a stable release. And will inform about it here
Nuxt module for using WordPress as a headless CMS with a Nuxt 3 frontend
- Content is fetched from WordPress using server-side GraphQL api calls
- Support for (Gutenberg Blocks), using WPEngine's wp-graphql-content-blocks https://faustjs.org/tutorial/get-started-with-wp-graphql-content-blocks
- Add
@vernaillen/wpnuxt
dependency to your project
# Using pnpm
pnpm add -D @vernaillen/wpnuxt
# Using yarn
yarn add --dev @vernaillen/wpnuxt
# Using npm
npm install --save-dev @vernaillen/wpnuxt
- Add '@vernaillen/wpnuxt' to the
modules
section ofnuxt.config.ts
export default defineNuxtConfig({
modules: [
'@vernaillen/wpnuxt'
]
})
That's it! You can now use the WPNuxt module in your Nuxt app ✨
# Install dependencies
npm install
# Generate type stubs
npm run dev:prepare
# Develop with the playground
npm run dev
# Build the playground
npm run dev:build
# Run ESLint
npm run lint
# Run Vitest
npm run test
npm run test:watch
# Release new version
npm run release