Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 5dd662f

Browse files
committed
mention algolia and other 3rd party services
1 parent 261c37f commit 5dd662f

File tree

1 file changed

+57
-8
lines changed

1 file changed

+57
-8
lines changed

README.md

Lines changed: 57 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ https://nextjs-wordpress-starter-staging.vercel.app/
1313
- [🎓 Overview](#-overview)
1414
- [Why?](#why)
1515
- [How's this all work?](#hows-this-all-work)
16+
- [3rd Party Services](#3rd-party-services)
17+
- [Algolia](#algolia)
18+
- [Chromatic](#chromatic)
19+
- [Vercel](#vercel)
20+
- [WP Engine](#wp-engine)
1621
- [🚀 Frontend Setup (Next.js)](#-frontend-setup-nextjs)
1722
- [Dependencies](#dependencies)
1823
- [Install](#install)
@@ -25,10 +30,11 @@ https://nextjs-wordpress-starter-staging.vercel.app/
2530
- [Storybook](#storybook)
2631
- [WebDevStudios Specific Info](#webdevstudios-specific-info)
2732
- [WordPress Github](#wordpress-github)
28-
- [WP Engine](#wp-engine)
29-
- [Chromatic](#chromatic)
33+
- [WP Engine](#wp-engine-1)
34+
- [Chromatic](#chromatic-1)
3035
- [1Password](#1password)
3136
- [Migrate DB Pro](#migrate-db-pro)
37+
- [Algolia](#algolia-1)
3238
- [Copy WP Engine Environments](#copy-wp-engine-environments)
3339
- [:octocat: Contributing](#octocat-contributing)
3440

@@ -38,11 +44,11 @@ https://nextjs-wordpress-starter-staging.vercel.app/
3844

3945
### Why?
4046

41-
It's easy to query a WordPress REST-API and map over some blog posts in JavaScript. That's where many examples on the Internet stop and you'd be hard pressed to find anything about supporting advanced features because **_headless WordPress is hard!_**
47+
Querying a REST-API or GraphQL endpoint and looping over blog posts is where many _"how to build a headless WordPress website"_ tutorials stop. You'd be hard pressed to find anything about supporting advanced features and plugins because **_headless WordPress is hard._**
4248

43-
At WebDevStudios we believe that WordPress is so much more than a blog-- and our clients require support for things like: SEO, forms, post previews, search, comments, authentication, custom post types, custom fields, etc...
49+
At WebDevStudios we believe that WordPress is so much more than a blog-- and our clients require support for things like: SEO, forms, previews, search, comments, authentication, custom post types, custom fields, etc...
4450

45-
With this starter, we've figured out "the hard stuff" and placed the sum of our knowledge into something the community (and our future projects) could use as a jumping off point.
51+
With this starter, we've figured out the hard stuff"and placed the sum of our knowledge into something the community (and our future projects) could use as a jumping off point.
4652

4753
### How's this all work?
4854

@@ -52,6 +58,37 @@ The frontend (Next.js) talks to the backend (WordPress) via GraphQL.
5258
<img src="https://dl.dropbox.com/s/9wsal7szatfwt6g/nextjs-wordpress-starter-frontend-backend-graphic.png?dl=0" alt="A graphic showing the relationship between environments">
5359
</details>
5460

61+
### 3rd Party Services
62+
63+
This starter uses a few 3rd party services.
64+
65+
<details>
66+
67+
- [Algolia](https://www.algolia.com/)
68+
- [Chromatic](https://www.chromatic.com/)
69+
- [Vercel](https://vercel.com/)
70+
- [WP Engine](https://wpengine.com)
71+
72+
#### Algolia
73+
74+
We use [WP Search with Algolia](https://wordpress.org/plugins/wp-search-with-algolia/) to push content indicies from WordPress to Algolia. You will need to set up a (free) account and place your API credentials in the frontend `.env` file _and_ in the WordPress plugin settings.
75+
76+
#### Chromatic
77+
78+
Chromatic automates gathering UI feedback, visual testing, and documentation, so developers can iterate faster with less manual work. You will need to update both [`package.json`](https://github.com/WebDevStudios/nextjs-wordpress-starter/blob/staging/package.json#L34) and [`chromatic.yml`](https://github.com/WebDevStudios/nextjs-wordpress-starter/blob/staging/.github/workflows/chromatic.yml) with your Chromatic API key in order to automate builds.
79+
80+
#### Vercel
81+
82+
Vercel is the company behind Next.js and offers a platform _[that was built for deploying](https://vercel.com/solutions/nextjs)_ Next.js apps.
83+
84+
Vercel has a generous free tier and offers support for both serverless functions (required if using incremental static regeneration) and [`next/image`](https://nextjs.org/docs/api-reference/next/image). Something neither Netlify nor Cloudflare support.
85+
86+
#### WP Engine
87+
88+
We're a partner with WP Engine and love their managed WordPress hosting options. That said, while hosting your headless WordPress install on WP Engine is recommended, it is not required.
89+
90+
</details>
91+
5592
---
5693

5794
## 🚀 Frontend Setup (Next.js)
@@ -88,7 +125,7 @@ yarn
88125

89126
**Step 4: Setup ENV Variables**
90127

91-
Copy the sample ENV file, then add your credentials:
128+
ENV variables are like constants in `wp-config.php`. Copy the sample ENV file, then add your credentials:
92129

93130
```bash
94131
cp .env.sample .env
@@ -146,9 +183,17 @@ Before you get started, make sure you have the following dependency installed on
146183

147184
- https://localwp.com/help-docs/getting-started/how-to-import-a-wordpress-site-into-local/
148185

149-
**Step 3: Start the `nextjs-wp` site**
186+
**Step 3: Configure `wp-config.php`**
150187

151-
**Note:** Make sure your Local URL matches the `LOCAL_WORDPRESS_API_URL` in the frontend `.env` file!
188+
The follow constant needs to be in `wp-config.php`:
189+
190+
```php
191+
define('HEADLESS_FRONTEND_URL', 'http://localhost:3000/');
192+
```
193+
194+
**Step 4: Start the `nextjs-wp` site**
195+
196+
**Note:** Make sure your local URL matches the `LOCAL_WORDPRESS_API_URL` in the frontend `.env` file!
152197

153198
---
154199

@@ -220,6 +265,10 @@ All of the credentials are in the following vault:
220265

221266
You can use Migrate DB Pro to pull databases and files. Please see 1password for credentials
222267

268+
### Algolia
269+
270+
The login and API credentials are in password.
271+
223272
### Copy WP Engine Environments
224273

225274
WP Engine supports [copying environments](https://wpengine.com/support/copy-site/). This should be done at the end of two week sprints (or as needed).

0 commit comments

Comments
 (0)