Skip to content

mberry1989/kontent-sample-app-conference-net

Repository files navigation

Kentico Kontent ASP.NET Core MVC Conference Web Application

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/

Application setup

Running in an IDE

To run the app:

  1. Clone the app repository with your favorite GIT client
    1. For instance, you can use Visual Studio, Visual Studio Code, GitHub Desktop, etc.
    2. 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).
  2. Open the solution in your IDE (using the kontent-sample-app-conference-net file).
  3. Run the app.

Connecting to our sample project

  1. Open the ~/kontent-sample-app-conference-net/appsettings.json file.
  2. Ensure DeliveryOptions contains the project ID:
  "DeliveryOptions": {
    "ProjectId": "db96e910-edf8-0094-b795-f3ce073c7ae0"
  }
  1. Save any changes.
  2. Run the application

Connecting to your project manually

  1. In Kentico Kontent, choose Project settings from the app menu.

  2. Under Development, choose API keys.

    • You will be copying the Project ID
  3. Open the ~/kontent-sample-app-conference-net/appsettings.json file.

  4. Replace project ID in DeliveryOptions:

  "DeliveryOptions": {
    "ProjectId": "YOUR_PROJECT_ID"
  }
  1. Save the changes.
  2. Run the application.

Enabling the Preview Delivery API

  1. Follow the "Connecting to your project manually" instructions above.

  2. In step 2, copy the Preview API Primary key.

  3. Open the ~/kontent-sample-app-conference-net/appsettings.json file.

  4. Add UsePreviewApi and PreviewApiKey keys to DeliveryOptions in the configuration:

  "DeliveryOptions": {
    "ProjectId": "YOUR_PROJECT_ID",
    "UsePreviewApi": true,
    "PreviewApiKey": "YOUR_DELIVERY_PREVIEW_API_KEY"
  }
  1. Save the changes.
  2. Run the application.

Migration scripts

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:

  1. Create a new project in your Kentico Kontent subscription
  2. In Kentico Kontent, choose Project settings from the app menu.
  3. 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."

Content administration

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:

  1. Navigating to https://app.kontent.ai in your browser.
  2. Signing in with your credentials.
  3. 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

Content delivery

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

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.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •