Next.js app repo for the React Summit workshop on June 2nd, 2022 and the WordSesh workshop on June 4th, 2021.
- Clone down this repo.
cd
into it and runnpm install
to install its dependencies.- Create a new
.env.local
file in the root folder with this as its contents:NEXT_PUBLIC_WORDPRESS_API_URL=https://content.wpgraphql.com/graphql
. If you want to point the Next.js app to a local WordPress install, swap outhttps://content.wpgraphql.com
with the domain for your local WordPress site (optional). - If you're using a local WordPress install, make sure you have the WPGraphQL plugin installed and activated.
- Run
npm run dev
to get the app up and running at http://localhost:3000. You can stop the app at any time by hittingctrl
+c
.
You can check out these commits in git to get caught up if you fall behind at any point.
- Blog index page:
05c3d27
- Single blog post page:
8b4bc54
- Single category page:
8d4a35b
- Search page:
c2d2b40
- Fragments:
d900a29