generated from Kentico/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable specifying custom Recombee region (also updates a lot of packages and rewrites to Vite) #10
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5811d23
Use Vite instead of CRA
JiriLojda 38d16cf
Update eslint configuration
JiriLojda d74cfae
Update kontent packages
JiriLojda a024b25
Enable specifying custom region and base uri for Recombee
JiriLojda f41f578
Update to use the new webhooks
JiriLojda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,24 @@ | ||
module.exports = { | ||
root: true, | ||
env: { browser: true, es2020: true }, | ||
extends: [ | ||
"@kontent-ai", | ||
"@kontent-ai/eslint-config/react", | ||
], | ||
ignorePatterns: ["dist", ".eslintrc.cjs"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: [ | ||
"tsconfig.json", | ||
"tsconfig.node.json", | ||
"src/functions/tsconfig.json", | ||
], | ||
}, | ||
plugins: ["react-refresh"], | ||
rules: { | ||
"react-refresh/only-export-components": [ | ||
"warn", | ||
{ allowConstantExport: true }, | ||
], | ||
}, | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,13 +67,15 @@ To run this integration, you'll need a Kontent.ai project + a [Recombee account] | |
|
||
You can include multiple Kontent.ai types and languages the webhook will be looking out for and synchronizing - to do so, just include them as a comma-separated list. | ||
|
||
Subsequently, set the Kontent.ai **Delivery API triggers** to watch for _Publish_ and _Unpublish_ of your content items. | ||
![webhook-setup](docs/webhook.jpg) | ||
|
||
At the end, this is an example of how your webhook might look like: | ||
Subsequently, set the `Triggers` to `published data`. Then choose `Specific events` and select only `Content item` events. (You can also unselect `Content item metadata changed` events as they won't affect the resulting data in the index.) | ||
|
||
![webhook-setup](docs/webhook.png) | ||
The resulting triggers setup should look like this: | ||
|
||
Save the webhook and copy the generated **secret** as it would be required as a parameter in the following step. | ||
![webhook-triggers-setup](docs/webhook-triggers.jpg) | ||
|
||
Save the webhook and copy the generated **secret** as it will be required as a parameter in the following step. | ||
|
||
4. ### Configure your Netlify functions | ||
|
||
|
@@ -160,7 +162,7 @@ $ npm install | |
$ netlify dev | ||
``` | ||
|
||
The custom element is created with [Create React App](https://create-react-app.dev/). | ||
The custom element is created with [Vite](https://vitejs.dev/). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's chage the screenshot for new webhooks 💪 |
||
|
||
## Contributors | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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,16 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Recombee Initializer for Kontent.ai</title> | ||
<!-- kontent.ai styling --> | ||
<link rel="stylesheet" type="text/css" href="/kontent-ai-app-styles.css"> | ||
<!-- kontent.ai custom elements api--> | ||
<script src="https://app.kontent.ai/js-api/custom-element/v1/custom-element.min.js"></script> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/index.tsx"></script> | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[build] | ||
base = "/" | ||
publish = "/build" | ||
publish = "/dist" | ||
command = "npm run build" | ||
functions = "src/functions" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where format :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The step above
dprint/check@v2.2
checks formatting.