You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 18, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: CODE_OF_CONDUCT.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe
34
34
35
35
## Enforcement
36
36
37
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at DevelopersCommunity@kentico.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
37
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at devrel@konten.ai. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
38
39
39
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
40
@@ -44,5 +44,3 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage], versi
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+6-9Lines changed: 6 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ There are many different ways in which you can contribute. One of the easiest wa
8
8
9
9
Please note that **level of provided support is always determined by the [LICENSE](LICENSE.md)** of a given open-source project. Also, always make sure you use the **[latest version](../../releases)** of any given OS project. We can't provide any help for older versions. We don't want to make things complicated so we try to take the same approach in all our repositories.
10
10
11
-
### I found a bug in a Kentico's open-source project
11
+
### I found a bug in a Kontent.ai open-source project
@@ -20,16 +20,15 @@ Sorry to hear that. Just log a new [GitHub issue](../../issues) and someone will
20
20
21
21
To get help with coding and structuring your projects, use [StackOverflow](https://stackoverflow.com/) to ask questions with one of the following tags:
Security issues and bugs should be reported privately, via email, to the Kentico Developer Community Team developerscommunity@kentico.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message.
31
+
Security issues and bugs should be reported privately, via email, to the Kontent.ai Developer Community Team devrel@kontent.ai. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message.
33
32
34
33
### I have an idea for a new feature (or feedback on existing functionality)
35
34
@@ -42,7 +41,7 @@ Everybody loves new features! You can submit a new [feature request](../../issue
Unless you're fixing a typo, it's usually a good idea to discuss the feature before you submit a pull request with code changes, so let's start with submitting a new [GitHub issue](../../issues) and discussing the whether it fits the vision of a given project.
45
-
You might also read these two blogs posts on contributing code: [Open Source Contribution Etiquette](http://tirania.org/blog/archive/2010/Dec-31.html) by Miguel de Icaza and [Don't "Push" Your Pull Requests](https://www.igvita.com/2011/12/19/dont-push-your-pull-requests/) by Ilya Grigorik. Note that all code submissions will be rigorously reviewed and tested by the Kentico Maintainers teams, and only those that meet an high bar for both quality and design/roadmap appropriateness will be merged into the source.
44
+
You might also read these two blogs posts on contributing code: [Open Source Contribution Etiquette](http://tirania.org/blog/archive/2010/Dec-31.html) by Miguel de Icaza and [Don't "Push" Your Pull Requests](https://www.igvita.com/2011/12/19/dont-push-your-pull-requests/) by Ilya Grigorik. Note that all code submissions will be rigorously reviewed and tested by the Kontent.ai Maintainers teams, and only those that meet an high bar for both quality and design/roadmap appropriateness will be merged into the source.
46
45
47
46
### Example - process of contribution
48
47
@@ -68,12 +67,10 @@ To start with coding, fork the repository you want to contribute to, create a ne
Your pull request will now go through extensive checks by the subject matter experts on our team. Please be patient. Update your pull request according to feedback until it is approved by one of the Kentico maintainers. After that, one of our team members may adjust the branch you merge into based on the expected release schedule.
70
+
Your pull request will now go through extensive checks by the subject matter experts on our team. Please be patient. Update your pull request according to feedback until it is approved by one of the Kontent.ai maintainers. After that, one of our team members may adjust the branch you merge into based on the expected release schedule.
The Kentico team is committed to fostering a welcoming community, therefore this project has adopted the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). If you have any additional questions or comments, you can contact us directly at developerscommunity@kentico.com.
The Kotent.ai team is committed to fostering a welcoming community, therefore this project has adopted the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). If you have any additional questions or comments, you can contact us directly at devrel@kontent.ai
This is a sample website written in Typescript utilizing the Kontent Delivery API to retrieve content from Kontent by Kentico. You can register your developer account at <https://app.kontent.ai>. For a brief walkthrough, check out [Running the React sample app](https://kontent.ai/learn/tutorials/develop-apps/get-started/run-the-react-sample-app) at Kontent Learn.
7
+
This is a sample website written in Typescript utilizing the Kontent.ai Delivery API to retrieve content from Kontent.ai. You can register your developer account at <https://app.kontent.ai>. For a brief walkthrough, check out [Running the React sample app](https://kontent.ai/learn/tutorials/develop-apps/get-started/run-the-react-sample-app) at Kontent.ai Learn.
8
8
9
9
## Application setup
10
10
@@ -17,15 +17,15 @@ This is a sample website written in Typescript utilizing the Kontent Delivery AP
17
17
18
18
### Connecting to your sample project
19
19
20
-
At the first run of the app, you'll be presented with a configuration page. It will allow you to connect the app to your Kontent project or create a new one. You'll also be able to start a trial and convert to a free plan when the trial expires.
20
+
At the first run of the app, you'll be presented with a configuration page. It will allow you to connect the app to your Kontent.ai project or create a new one. You'll also be able to start a trial and convert to a free plan when the trial expires.
21
21
22
22
Alternatively, you can connect your project manually as per the chapter below.
23
23
24
24
#### Connecting to your project manually
25
25
26
-
If you want to change the source Kontent project, follow these steps:
26
+
If you want to change the source Kontent.ai project, follow these steps:
27
27
28
-
1. In Kontent, choose Project settings from the app menu.
28
+
1. In Kontent.ai, choose Project settings from the app menu.
29
29
2. Under Development, choose API keys.
30
30
3. Copy your Project ID.
31
31
4. Open `.env.example` in the root directory.
@@ -38,17 +38,17 @@ When you now run the sample application, the application retrieves content from
38
38
39
39
Deploy, explore and change the app directly in the browser.
40
40
41
-
[](https://glitch.com/edit/#!/remix/clone-from-repo?REPO_URL=https://github.com/Kentico/kontent-sample-app-react)
41
+
[](https://glitch.com/edit/#!/remix/clone-from-repo?REPO_URL=https://github.com/kontent-ai/sample-app-react)
42
42
43
-
[](https://app.netlify.com/start/deploy?repository=https://github.com/Kentico/kontent-sample-app-react)
43
+
[](https://app.netlify.com/start/deploy?repository=https://github.com/kontent-ai/sample-app-react)
44
44
45
45
## Previewing content from your project
46
46
47
-
If you already have a Kontent account and you want to connect the sample application to a project of your own, you need to provide your Project ID and your Preview API key to authorize requests to the Delivery Preview API. For example, you can connect the application to your modified version of the sample project.
47
+
If you already have a Kontent.ai account and you want to connect the sample application to a project of your own, you need to provide your Project ID and your Preview API key to authorize requests to the Delivery Preview API. For example, you can connect the application to your modified version of the sample project.
48
48
49
49
To preview content in the sample application, follow these steps:
50
50
51
-
1. In Kontent, choose Project settings from the app menu.
51
+
1. In Kontent.ai, choose Project settings from the app menu.
52
52
2. Under Development, choose API keys.
53
53
3. Copy your Project ID and Preview API key.
54
54
4. Open `.env.example` in the root directory .
@@ -63,18 +63,18 @@ When you now run the application, you will see all project content including the
63
63
2. Sign in with your credentials.
64
64
3. Manage content in the content administration interface of your sample project.
65
65
66
-
You can learn more about content editing in our tutorials at [Kontent Learn](https://kontent.ai/learn/tutorials/write-and-collaborate/create-content/introducing-content-items).
66
+
You can learn more about content editing in our tutorials at [Kontent.ai Learn](https://kontent.ai/learn/tutorials/write-and-collaborate/create-content/introducing-content-items).
67
67
68
68
## Content delivery
69
69
70
-
You can retrieve content either through the Kontent Delivery SDKs or the Kontent Delivery API:
70
+
You can retrieve content either through the Kontent.ai Delivery SDKs or the Kontent.ai Delivery API:
71
71
72
72
- For published content, use `https://deliver.kontent.ai/PROJECT_ID/items`.
73
73
- For unpublished content, use `https://preview-deliver.kontent.ai/PROJECT_ID/items`.
74
74
75
75
For more info about the API, see the [API reference](https://kontent.ai/learn/reference).
76
76
77
-
You can find the Delivery and other SDKs at <https://github.com/Kentico>.
77
+
You can find the Delivery and other SDKs at <https://github.com/kontent-ai>.
78
78
79
79
## Used toolchain
80
80
@@ -86,15 +86,15 @@ There are two types of model mapping in this application:
86
86
87
87
### content type -> DTO -> component
88
88
89
-
Content type definitions are being generated from content types via [Kontent.ai model generator](https://github.com/Kentico/kontent-model-generator-js) tool. All generated types can be found in `src/Models` folder. The `_project.ts` contains information about the project structure such as project languages as well as other structure information like codenames about content types.
89
+
Content type definitions are being generated from content types via [Kontent.ai model generator](https://github.com/kontent-ai/model-generator-js) tool. All generated types can be found in `src/Models` folder. The `_project.ts` contains information about the project structure such as project languages as well as other structure information like codenames about content types.
90
90
91
91
### content type -> DTO -> view model -> component
92
92
93
93
Some models displayed in views might require an adjustment from content types. For example, the `Cafe` content type contains fields for `city` and `street` and we would like to have a model containing an address in the format `city, street`. An example of such a view model is in `CafeModel.tsx` that can be found in the `src/ViewModels` folder. To convert `Cafe` into `CafeModel` the function located in `src/Utilities/CafeListing.ts` can be used.
94
94
95
95
### Data fetching
96
96
97
-
This solution fetches data using the [Delivery client](https://github.com/Kentico/kontent-delivery-sdk-js). For more implementation detail to set up the client see `src/Client.ts`. The data are fetched and stored in a `container` component directly in its state. Then they are passed to the `presentation` component. For a better understanding see the code example below. However, depending on your needs, you can use other technologies for managing application states such as:
97
+
This solution fetches data using the [Delivery client](https://github.com/kontent-ai/delivery-sdk-js). For more implementation detail to set up the client see `src/Client.ts`. The data are fetched and stored in a `container` component directly in its state. Then they are passed to the `presentation` component. For a better understanding see the code example below. However, depending on your needs, you can use other technologies for managing application states such as:
You might want to request items based on the URL slugs. For more information check out [Kontent.ai/learn tutorial](https://kontent.ai/learn/tutorials/develop-apps/get-content/localized-content-items/#a-get-items-by-localized-url-slug). An example in this application for this is provided in `src/Pages/About.tsx` page.
231
231
232
-
> The showcase is not ideal, because it is using a combination of the language prefix and localizable solution is not ideal. You should try to stick with one of the approaches. Because it is hard to define the behavior for language setting clash i.e. `/<EN-PREFIX>/articles/<ES-URL-SLUG>`.
232
+
> The showcase is not ideal, because it is using a combination of the language prefixes and localizable routes. You should try to stick with one of the approaches. Because it is hard to define the behavior (priority) for language setting clashes like `/<EN-PREFIX>/articles/<ES-URL-SLUG>.
233
+
234
+
### Languagefallbacks
235
+
236
+
Todealwithcontentthatisnotavailableincurrentlanguage, thisprojectusesmethodcalledlanguagefallbacks. ItwillfetchthecontentinthelanguagewhichsetasfallbacklanguageintheKontent.aiprojectandredirectthewebsitetotheURLwithprefixofthegivenlanguage. However, itispossibletodisablelanguagefallbacksbyaddingafilterof`system.language`toyourquery. Formoreinformationaboutgettinglocalizedcontentcheckthis [`link.`](https://kontent.ai/learn/tutorials/develop-apps/get-content/localized-content-items/?tech=javascript)
237
+
238
+
```js
239
+
var query = Client.items<AboutUs>().type(contentTypes.about_us.codename);
240
+
241
+
if (this.language) {
242
+
query
243
+
.languageParameter(this.language)
244
+
.equalsFilter('system.language', 'es-ES');
245
+
}
246
+
```
233
247
234
248
## Handling404
235
249
@@ -245,4 +259,4 @@ We would like to express our thanks to the following people who contributed and
245
259
246
260
- [BeeMartinez](https://github.com/beemtz)
247
261
248
-
Would you like to become a hero too? Pick an [issue](https://github.com/Kentico/kontent-sample-app-react/issues) and send us a pull request!
262
+
Wouldyouliketobecomeaherotoo?Pickan [issue](https://github.com/kontent-ai/delivery-sdk-js/issues) and send us a pull request!
0 commit comments