This is a sample website written in .NET Core 3.1 that uses the Kentico Kontent Delivery .NET SDK to manage and retrieve content from Kentico Kontent. The sample site demonstrates how to use Kentico Kontent to create and manage a conference website including support for: multiple events, agendas, speaker biographies, venue descriptions, and registrations using a HubSpot form.
You can see the site in action at: https://konnections.herokuapp.com/
To run the app:
- Clone the app repository with your favorite GIT client
- For instance, you can use Visual Studio, Visual Studio Code, GitHub Desktop, etc.
- Alternatively, you can download the repo as a ZIP file, but this will not adapt the line endings in the downloaded files to your platform (Windows, Unix).
- Open the solution in your IDE (using the kontent-sample-app-conference-net file).
- Run the app.
- Open the
~/kontent-sample-app-conference-net/appsettings.json
file. - Ensure
DeliveryOptions
contains the project ID:
"DeliveryOptions": {
"ProjectId": "db96e910-edf8-0094-b795-f3ce073c7ae0"
}
- Save any changes.
- Run the application
-
In Kentico Kontent, choose Project settings from the app menu.
-
Under Development, choose API keys.
- You will be copying the Project ID
-
Open the
~/kontent-sample-app-conference-net/appsettings.json
file. -
Replace project ID in
DeliveryOptions
:
"DeliveryOptions": {
"ProjectId": "YOUR_PROJECT_ID"
}
- Save the changes.
- Run the application.
-
Follow the "Connecting to your project manually" instructions above.
-
In step 2, copy the Preview API Primary key.
-
Open the
~/kontent-sample-app-conference-net/appsettings.json
file. -
Add
UsePreviewApi
andPreviewApiKey
keys toDeliveryOptions
in the configuration:
"DeliveryOptions": {
"ProjectId": "YOUR_PROJECT_ID",
"UsePreviewApi": true,
"PreviewApiKey": "YOUR_DELIVERY_PREVIEW_API_KEY"
}
- Save the changes.
- Run the application.
Note: migrating a copy of the sample site requires access to the Management API available in the Trial, Business, or Enterprise plans. Please check your subscription to verify your tier.
A Migration tool for a copying this sample site to your subscription is available here: https://github.com/pokornyd/konference-migration-scripts . This two provides two options:
- A "Full" copy that includes Content Types, Taxnomies, Assets, and Content Items
- A "Minimal" copy that includes Content Types and Taxnomies, but no Content Items or Assets
The "Full" copy is a working example containing three conferences and is meant for demonstration or as a reference. The "Minimal" copy acts a clean boilerplate that you can use to create your own conference site.
Prior to running the tool you will need to:
- Create a new project in your Kentico Kontent subscription
- In Kentico Kontent, choose Project settings from the app menu.
- Under Development, choose API keys.
- You will be copying the Project ID and Management API key.
When running the tool, follow the console prompts and copy paste in the respective keys. The application will notify you when the migration has completed with the message "Migration finished."
Note: Managing the content when using our sample site project Id is not possible.
After using either the "Full" or "Minimal" migrations above, you can manage your content by:
- Navigating to https://app.kontent.ai in your browser.
- Signing in with your credentials.
- Managing content in the content administration interface of your migrated project.
You can learn more about content editing with Kentico Kontent in our Help Center. Instructions for managing the Conference site's content can also be seen here: Managing the sample conference site and Using the "Minimal" copy
You can retrieve content through the Kentico Kontent Delivery SDK or the Kentico Kontent Delivery API:
- For published content, use
https://deliver.kontent.ai/PROJECT_ID/items
. - For unpublished content, use
https://preview-deliver.kontent.ai/PROJECT_ID/items
.
For more details about Kentico Kontent APIs, see our API reference. For details about the Kentico Konten .NET SDK used throughout this project, please see the Kentico Kontent Delivery .NET SDK ReadMe
Edit mode has been enabled on the "Home" and "Agenda" pages in the sample site using the steps from the Kontent documentation here: Editing content directly from your app.
Editing an item in Kontent requires the user to be added to the project and logged in to Kentico Kontent.