my-first-headless-wordpress-site

所属分类:建站系统
开发工具:JavaScript
文件大小:81KB
下载次数:0
上传日期:2022-06-02 21:14:55
上 传 者sh-1993
说明:  我的第一个无头新闻网站,,
(my-first-headless-wordpress-site,,)

文件列表:
components (0, 2022-06-03)
components\Header.js (133, 2022-06-03)
components\Layout.js (256, 2022-06-03)
components\Nav.js (438, 2022-06-03)
components\PostCard.js (725, 2022-06-03)
components\PostsList.js (339, 2022-06-03)
dummy-data (0, 2022-06-03)
dummy-data\index.js (33191, 2022-06-03)
lib (0, 2022-06-03)
lib\apolloClient.js (188, 2022-06-03)
package-lock.json (210707, 2022-06-03)
package.json (366, 2022-06-03)
pages (0, 2022-06-03)
pages\[...uri].js (1625, 2022-06-03)
pages\_app.js (313, 2022-06-03)
pages\blog.js (497, 2022-06-03)
pages\category (0, 2022-06-03)
pages\category\[slug].js (771, 2022-06-03)
pages\index.js (1788, 2022-06-03)
pages\search.js (1389, 2022-06-03)
public (0, 2022-06-03)
public\favicon.ico (4286, 2022-06-03)
styles (0, 2022-06-03)
styles\Home.module.css (1803, 2022-06-03)
styles\globals.css (5644, 2022-06-03)

# My First Headless WordPress Site Next.js app repo for the [React Summit](https://reactsummit.com/) workshop on June 2nd, 2022 and the [WordSesh](https://wordsesh.com/) workshop on June 4th, 2021. ## Local Setup 1. Clone down this repo. 1. `cd` into it and run `npm install` to install its dependencies. 1. 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 out `https://content.wpgraphql.com` with the domain for your local WordPress site (optional). 1. If you're using a local WordPress install, make sure you have the [WPGraphQL plugin](https://wordpress.org/plugins/wp-graphql/) installed and activated. 1. Run `npm run dev` to get the app up and running at http://localhost:3000. You can stop the app at any time by hitting `ctrl` + `c`. ## Checkpoints You can check out these commits in git to get caught up if you fall behind at any point. 1. Blog index page: `05c3d27` 1. Single blog post page: `8b4bc54` 1. Single category page: `8d4a35b` 1. Search page: `c2d2b40` 1. Fragments: `d900a29`

近期下载者

相关文件


收藏者