A complete Headless WordPress tech stack built on Nuxt 4.
Works best with the fuxt-backend WordPress theme and included WordPress optimized components.
Built by Funkhaus. We normally host on Flywheel.
PS: The name Fuxt comes from Funkhaus and Nuxt. It's provocative.
- TODO
SEO is driven by the Yoast SEO WordPress plugin, exposed through fuxt-api (>= 0.1.5) as an optional seo field on /post.
<wp-seo />in the layout renders the head for the current route: title, description, robots, canonical, Open Graph, Twitter and Yoast's JSON-LD schema, falling back to the WordPress title/excerpt/featured image and then the site settings when Yoast has nothing.useWpFetch(RequestType.POST, ...)requests theseofield automatically and publishes the response tousePageSeo()when the requesturimatches the current route. Passseo: trueto force this for a page whose fetch uri differs from its route (eg:uri: '/home/'on/), orseo: falsefor a/postrequest that is not the page's own entity (related posts, teasers).- Editors control titles, descriptions, social images, canonicals and noindex per page in Yoast. Never work around design needs with content hacks such as blank titles or dashes as line breaks; add fields or hide UI in code instead.
/sitemap.xmllists the routes Nitro's prerender crawler reaches from/, so every section must be linked from server-rendered HTML: gate navigation withv-show, neverv-if, and don't server-redirect a landing route that is the only path into a section./robots.txtcomes from@nuxtjs/robots;/sitemap_index.xmlredirects to/sitemap.xmlbecause Yoast links that name./llms.txtis proxied from the file Yoast generates at the WordPress root. Enable it under Yoast → Settings → Site features; it regenerates weekly, or on toggling the feature.- WordPress "Site Address (URL)" must be the frontend domain: Yoast builds canonicals,
og:urland schema from it.
This is just a Nuxt site, so it builds and deploys like any other Nuxt project.
Works best with the fuxt-backend WordPress theme as the backend.
First step: Duplicate and rename .example.env to .env. Define any vars environment needed there.
# install dependencies
$ npm install
# serve with hot reload at localhost:3000
$ npm run dev
# serve with hot reload Storybook at localhost:3003
$ npm run storybook
# build for production and launch server
$ npm run build
$ npm start
# build Storybook for production
$ npx nuxt storybook build
# generate static project
$ npm run generate
For detailed explanation on how things work, checkout the wiki.