WPNuxt
Nuxt + headless WordPress
Type-safe composables for fetching WordPress content via GraphQL.
Render Gutenberg blocks as Vue components.
Currently in alpha — API is stabilizing.
Render Gutenberg blocks as Vue components.
Currently in alpha — API is stabilizing.
WordPress as a headless CMS
with a modern Nuxt frontend
Type-Safe GraphQL
Auto-generated TypeScript types from your WordPress schema. Full IDE support.
Gutenberg Blocks
Render WordPress blocks as Vue components. Customize each block type.
Server-Side Caching
GraphQL responses cached on the server with stale-while-revalidate support.
Simple Composables
Fetch posts, pages, menus, and more with auto-generated composables:
usePosts()
usePages()
useMenu({ name: "main" })
useGeneralSettings()
pages/index.vue
<script setup lang="ts">
const { data: posts } = await usePosts()
</script>
<template>
<article v-for="post in posts" :key="post.id">
<NuxtLink :to="post.uri">
{{ post.title }}
</NuxtLink>
<div v-sanitize-html="post.excerpt" />
</article>
</template>
Packages
@wpnuxt/core
GraphQL integration, auto-generated composables, server-side caching.
@wpnuxt/blocks
Render Gutenberg blocks as Vue components with NuxtImg optimization.
@wpnuxt/auth
WordPress authentication with GraphQL support.