Skip to content

Commit

Permalink
Merge branch 'develop' into feature/redis-sentinel-support
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasio authored Nov 20, 2023
2 parents ecc4ec3 + 1a5fe38 commit e3c5869
Show file tree
Hide file tree
Showing 66 changed files with 1,765 additions and 560 deletions.
6 changes: 0 additions & 6 deletions .changeset/bright-bees-press.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/bright-jokes-learn.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/curly-apricots-stare.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/gentle-clouds-taste.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/good-papayas-laugh.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/hot-papayas-relate.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/lovely-chicken-sparkle.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/mighty-stingrays-pay.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/popular-turkeys-sleep.md

This file was deleted.

31 changes: 0 additions & 31 deletions .changeset/pre.json

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/proud-dryers-repeat.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/silent-kiwis-compare.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tame-squids-fail.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/two-cats-vanish.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '8.2'
- name: composer install
run: cd ./wp/headless-wp && composer install --ignore-platform-reqs
- name: Check PHPCS standard
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ jobs:
phpunit:
name: phpunit
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.4', '8.0', '8.2']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: "8.0"
php-version: ${{ matrix.php-version }}
- name: npm install
run: npm install
- name: composer install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [16.x, 18.x, 20.x]

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
20
2 changes: 1 addition & 1 deletion docs/documentation/01-Getting Started/headless-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ After adding a custom taxonomy to the config, you will be able to filter posts b

```js
usePost({ postType: ['book'], genre: 'action' });
usePosts({ postType:'book', genre: 'action' perPage: 10 });
usePosts({ postType:'book', genre: 'action', perPage: 10 });
useTerms({ taxonomy: 'genre' });
```

Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/02 - Data Fetching/useSeo.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ const yoast_json = useSeo('json');
const yoast_head = useSeo('html');
```

If there's no seo information for the current route, this hook will return `null`.
If there's no seo information for the current route, this hook will return `null` therefore we recommend checking for null before using the return value.
19 changes: 19 additions & 0 deletions docs/documentation/06-WordPress Integration/basic-auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
slug: /wordpress-integration/basic-auth
---

# Basic Auth

If WordPress is protected by Basic Auth (which is common during development) you can tell HeadstartWP the basic auth creds so that all
REST API requests include them. To do so, simply add the following env variables:

```
WP_BASIC_AUTH_USERNAME=username
WP_BASIC_AUTH_PASSWORD=password
```

:::caution
The above env variables will only be accessible server-side and therefore any client-side requests made directly to WordPress will fail. This happens because Next.js only includes env variables prefixed with `NEXT_PUBLIC_` in the browser bundle.

If you want your client-side requests to work, prefix the above variables with `NEXT_PUBLIC_`. But note that the basic auth creds will be leaked to the public.
:::caution
Loading

0 comments on commit e3c5869

Please sign in to comment.