This is a template for displaying WordPress JSON API articles in Next.js. It generates static files with SSG, so you can easily build a very fast and secure blog.
url: https://masahiro.me/
First, you need a WordPress site.
Set your site domain and WordPress JSON API url to env section in docker-compose.yml
.
version: "3.9"
services:
web:
build: .
command: tail -f /dev/null
ports:
- 3000:3000
environment:
# Set your WordPress API url
WORDPRESS_API_URL: 'https://mokubo.website/wp-json/wp/v2'
# Set your domain.
DOMAIN: 'masahiro.me'
volumes:
- ./:/app
- /app/node_modules
- /app/build
docker compose build
docker compose up -d
docker compose web yarn dev
docker compose web yarn lint:fix
Once you have access to the environment variables you'll need, deploy the example using Vercel:
MIT