/nuxt-wordpress

WordPress Headless Layer for Nuxt 3. Allows you to quickly get started building websites with WordPress as a headless CMS.

Primary LanguageTypeScript

Nuxt WordPress

npm version npm downloads License

WordPress Headless Layer for Nuxt 3. Allows you to quickly get started building websites with WordPress as a headless CMS.

Warning This layer is in beta. While the first integrations already work, it's WIP, so things can change anytime. Please report any issues/feature requests you have.

Quick Setup

  1. Add nuxt-wordpress dependency to your project
# Using pnpm
pnpm add -D nuxt-wordpress

# Using yarn
yarn add --dev nuxt-wordpress

# Using npm
npm install --save-dev nuxt-wordpress
  1. Add nuxt-wordpress to the extends section of nuxt.config.ts
export default defineNuxtConfig({
  extends: ['nuxt-wordpress'],

  runtimeConfig: {
    wordpress: {
      baseUrl: 'https://your-wordpress-site.com',
      twicpicsDomain: twicpicsDomain,
      twicpicsPaths: [
        {
          path: '/example/',
          source: 'https://your-wordpress-site.com',
        },
      ],
    },
  },
})

That's it! You can now use Nuxt WordPress in your Nuxt app ✨