Home
Softono
boilerplate-statiq-net

boilerplate-statiq-net

Open source MIT C#
11
Stars
2
Forks
1
Issues
19
Watchers
2 years
Last Commit

About boilerplate-statiq-net

Boilerplate utilizing Statiq and Kontent.ai to provide a starting point in the Jamstack world for .NET developers.

Platforms

Web Self-hosted Windows

Languages

C#

Statiq boilerplate for Kontent.ai

Build and publish Live Demo

Boilerplate utilizing Statiq and Kontent.ai to provide a starting point in the Jamstack world for .NET developers.

Screenshot

Get started

Requirements

Clone the codebase

  1. Click the "Use this template" button to create your own repository from this template.

Running locally

dotnet run -- preview

๐ŸŽŠ๐ŸŽ‰ Visit http://localhost:5080 and start exploring the code base!

By default, the content is loaded from a shared Kontent.ai project. If you want to use your own clone of the project so that you can customize it and experiment with Kontent, continue to the next section.

Create a content source

Application itself is configured to use shared alvawys avalable Kontent-ai project.

If you want to generate the clone of the project in order to be able to edit the content, use Sample site generator.

  1. Use "CREATE A NEW SAMPLE PROJECT" for generating the project.
  2. Access the project listing on Kontent.ai application](https://app.kontent.ai/projects)
  3. Select newly generated project (its name is about to be Sample Project M/DD/YYYY, H:MM:SS AM/PM).
  4. Enter Project settings -> API keys and copy the Project ID.
  5. Adjust appsettings.json, Tools/GenerateModels.ps1, and Tools/GenerateModels.sh by using your project ID.
  6. Rebuild the project and run dotnet run -- preview.

๐Ÿš€ You are now ready to use the site with your own Kontent.ai project as data source on http://localhost:5080! ๐Ÿš€

Features

  • Kontent.ai Model Generator for generating strongly-typed models from Kontent.ai model.
  • Kontent.Statiq module for simple data loading from Kontent.ai to strongly-typed models
  • Sass initial styles for easier style including reset.css
  • Razor template engine setup with simple layout

How it's build

All of the information about boilerplate creation and the content modeling in Kontent.ai have been written up on the blog post Jamstack on .NET - From zero to hero with Statiq and Kontent.ai.