Back to templates

Template details

Statiq boilerplate for Kontent.ai

A .NET Jamstack boilerplate combining Statiq static site generator with Kontent.ai headless CMS.

About this template

Statiq boilerplate for Kontent.ai is a GitHub boilerplate template that combines the Statiq static site generator with the Kontent.ai headless CMS, giving .NET developers a ready-made Jamstack starting point.

What is Statiq boilerplate for Kontent.ai?

This template provides a foundation for building static websites with .NET. It takes content stored in a Kontent.ai project and generates a fully static HTML site using Statiq, a static site generator for .NET. The output is a static site that can be hosted anywhere, and the content is loaded from Kontent.ai via the Kontent.Statiq module. The project is maintained by the Kontent.ai organization and includes a live demo hosted on GitHub Pages.

Key Features

  • Kontent.ai Model Generator – Automatically generates strongly-typed C# models from your Kontent.ai content types, so you can work with typed objects instead of raw JSON.
  • Kontent.Statiq module – Simplifies loading content from Kontent.ai into those strongly-typed models during the site generation pipeline.
  • Sass styling with reset.css – Includes initial Sass styles and Eric Meyer's reset.css to give you a clean starting point for custom styling.
  • Razor template engine – Uses the Razor templating syntax with a simple layout, familiar to ASP.NET developers.
  • Pre-configured shared Kontent.ai project – The default configuration loads content from a shared Kontent.ai project, so you can run the site immediately.
  • Easy personalization – You can create your own Kontent.ai project using the Sample site generator, then update the project ID in the configuration to use your own content.
  • .NET 6 – Requires .NET 6 SDK to run locally.
  • Live demo – A working example is available at https://kontent-ai.github.io/boilerplate-statiq-net.

Who is it for?

  • .NET developers who want to try Jamstack without learning JavaScript-based static site generators.
  • Teams already using Kontent.ai who need a static site front-end with strongly-typed models.
  • Developers who prefer Razor templates and want to build content-driven sites with C#.

What can you do with it?

  • Build a blog or content site – Use Kontent.ai as the headless CMS and generate a static site with Razor templates.
  • Customize the design – Modify the Sass files and layout to match your brand.
  • Automate model generation – Run the included model generator scripts to regenerate C# models whenever your content types change.

How does it work?

To get started, click the "Use this template" button on GitHub to create your own repository. Clone it, ensure .NET 6 is installed, and run dotnet run -- preview. The site will be available at http://localhost:5080. To use your own Kontent.ai project, create a sample project in Kontent.ai, copy the Project ID, and update the appsettings.json file and the model generator scripts accordingly.

screenshot of Statiq boilerplate for Kontent.ai on template0.com