Skip to content

leonlafa/nextjs-wordpress

Β 
Β 

Repository files navigation

Next.js + WordPress

πŸ’€ It's headless WordPress!

Features

  • Next.js w/ TypeScript
  • WordPress in a Docker container with PHP 8.1
  • Self-signed SSL certificate from Traefik
  • Apollo Client w/ WP GraphQL
  • On-demand revalidation
  • Date based blog routing (YYYY/MM/DD/slug)
  • SEO via Yoast
  • Menus support
  • Preview support
  • Comments support
  • Post reactions support
  • Custom Post Types via CPT UI
  • Custom Fields via Advanced Custom Fields
  • ESLint, Stylelint, Prettier, and more!

Demo

See a fully working, production site running this stack at https://gregrickaby.com


Monorepo

This project is a monorepo managed by Turborepo.

nextjs-wordpress
β”œβ”€β”€ apps
β”‚   β”œβ”€β”€ docs
β”‚   β”œβ”€β”€ nextjs
β”‚   └── wordpress
β”œβ”€β”€ packages
β”‚   β”œβ”€β”€ eslint-config-custom
β”‚   β”œβ”€β”€ nextjs-wordpress-plugin
β”‚   β”œβ”€β”€ nextjs-wordpress-theme
β”‚   β”œβ”€β”€ prettier-config-custom
β”‚   β”œβ”€β”€ stylelint-config-custom
β”‚   └── tsconfig
└── turbo.json

apps/

The applications directory. This includes the documentation, Next.js (frontend), and WordPress (backend).

packages/

Shared packages used by the apps. This includes ESLint, Stylelint, Prettier, and TypeScript configs. As well as the WordPress plugin and theme.

turbo.json

The repo config file. Learn more about configuring Turborepo.


Quick Start

Prequisites

  1. Docker Desktop

  2. Node LTS

  3. Clone this repo:

npx degit gregrickaby/nextjs-wordpress nextjs-wordpress
  1. Set up your dev environment:
npm run setup

Full Documentation

The docs are a work in progress. You can view them here.


Contributing

Contributions are welcome! Please see the contributing guidelines for more information.


Props

A special thanks to the following people:

I ❀️❀️❀️ the open source community, and hope this project inspires you to create something awesome.

Cheers! 🍻


About

πŸ’€ It's headless WordPress!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 66.9%
  • PHP 23.3%
  • Shell 5.4%
  • JavaScript 3.6%
  • CSS 0.8%