Sample .NET Core Razor Pages project using the Kentico Kontent Delivery .NET SDK to retrieve content.
This application is meant for use with the Dancing Goat sample project within Kentico Kontent. The project contains the home page and article content for Dancing Goat – an imaginary chain of coffee shops. If you don't have your own Sample Project, any administrator of a Kentico Kontent subscription can generate one.
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, however, this will not adapt line endings in downloaded files to your platform (Windows, Unix).
- Open the solution in Visual Studio (using the kontent-sample-app-razorpages.sln file).
- Run the app.
If you already have a Kentico Kontent account, you can connect this sample Razor Pages application to your version of the Sample project.
-
In Kentico Kontent, choose Project settings from the app menu.
-
Under Development, choose API keys and copy the Project ID.
-
Open the
\kontent-sample-app-razorpages\appsettings.json
file. -
Use the values from your Kentico Kontent project in the
appsettings.json
file:- Project ID: Insert your project ID into the
ProjectId
application setting.
- Project ID: Insert your project ID into the
{
"DeliveryOptions": {
"ProjectId": "<your Kontent project ID>"
},
}
- Save the changes.
- Run the application.
- Navigate to https://app.kontent.ai in your browser.
- Sign in with your credentials.
- Manage content in the content administration interface of your sample project.
You can learn more about content editing with Kentico Kontent in our Documentation.
You can retrieve content either through the Kentico Kontent Delivery SDK or the Kentico Kotent Delivery API.