-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into bmo/add-github-settings-page
- Loading branch information
Showing
45 changed files
with
1,014 additions
and
1,556 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Git: Error | ||
|
||
An error occurred while syncing models to Prismic from a Git repository. | ||
|
||
### How to fix the issue | ||
|
||
Sync the project again by committing to the repository. | ||
|
||
If the issue is not resolved, please check the [Prismic Help Center](https://prismic.io/docs/help-center). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Git: Invalid Slice Machine config | ||
|
||
The Git repository's Slice Machine configuration file (`slicemachine.config.json`) was not valid. | ||
|
||
Any of the following issues could cause this error: | ||
|
||
- Missing required properties, such as `repositoryName` and `adapter`. | ||
- Invalid values given to configuration properties. | ||
- Invalid JSON with incorrect syntax. | ||
|
||
## How to fix the issue | ||
|
||
Update the project's Slice Machine configuration file, fixing any syntax errors or incorrect properties. | ||
|
||
A basic Slice Machine configuration file looks like this: | ||
|
||
```json | ||
// slicemachine.config.json | ||
|
||
{ | ||
"repositoryName": "example-prismic-repo", | ||
"adapter": "@slicemachine/adapter-next", | ||
"libraries": ["./src/slices"], | ||
"localSliceSimulatorURL": "http://localhost:3000/slice-simulator" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Git: Unauthorized GitHub access | ||
|
||
The GitHub app tried to make a request to GitHub, but failed due to unauthorized access. | ||
|
||
This error can occur when your GitHub access token expires. Note that GitHub access tokens are managed for you by installing the Prismic GitHub app and is not something you need to manage manually. | ||
|
||
## How to fix the issue | ||
|
||
If the error occurs continuously, try the following steps: | ||
|
||
1. On GitHub, uninstall the Prismic GitHub app. | ||
2. In Slice Machine, navigate to the Settings page and re-install the Prismic GitHub app. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Git: Unauthorized Prismic access | ||
|
||
The GitHub app tried to make a request to Prismic, but failed due to unauthorized access. | ||
|
||
This error can occur when syncing model changes to Prismic from GitHub with an invalid Prismic Write API token. | ||
|
||
## How to fix the issue | ||
|
||
Re-connect the Prismic and GitHub repositories, ensuring the Write API token is active and correct: | ||
|
||
1. In Slice Machine's Settings page, disconnect the connected GitHub repository. | ||
1. Re-connect the GitHub repository. | ||
1. When asked for a Write API token, provide a valid token. | ||
|
||
Tokens can be created following these steps: | ||
|
||
1. In the Prismic repository, navigate to the Settings page. | ||
1. Select **API & Security** in the sidebar and the **Write APIs** tab at the top of the page. | ||
1. Create and copy a new Write API token or copy an existing token. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Git: Unsupported adapter | ||
|
||
The Slice Machine project uses an adapter that is not supported in the GitHub app. | ||
|
||
The following adapters are supported: | ||
|
||
- [`@slicemachine/adapter-next`](https://github.com/prismicio/slice-machine/tree/main/packages/adapter-next#readme): Next.js projects. | ||
- [`@slicemachine/adapter-nuxt`](https://github.com/prismicio/slice-machine/tree/main/packages/adapter-nuxt#readme): Nuxt projects. | ||
- [`@slicemachine/adapter-sveltekit`](https://github.com/prismicio/slice-machine/tree/main/packages/adapter-sveltekit#readme): SvelteKit projects. | ||
|
||
### How to fix the issue | ||
|
||
Use a supported adapter. | ||
|
||
You can verify which adapter your project uses by checking the `adapter` property in your project's `slicemachine.config.json`. | ||
|
||
A basic Slice Machine configuration file looks like this: | ||
|
||
```jsonc | ||
// slicemachine.config.json | ||
|
||
{ | ||
"repositoryName": "example-prismic-repo", | ||
"adapter": "@slicemachine/adapter-next", | ||
"libraries": ["./src/slices"], | ||
"localSliceSimulatorURL": "http://localhost:3000/slice-simulator" | ||
} | ||
``` | ||
|
||
If you would like us to support your adapter, please [open a feature request](https://github.com/prismicio/slice-machine/issues/new/choose). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.