Skip to content

Kruso/Kruso.Umbraco.Delivery

Repository files navigation

This package will add a REST-like content delivery API to Umbraco CMS. It provides a number of API endpoints to access content, search, and other functions.

Works on

Umbraco v11+

Setup

Find full setup details in the Wiki here

Run the following or or find the package on NuGet here

dotnet add Kruso.Umbraco.Delivery

Configure Startup.ConfigureServices() like this:

    services.AddUmbracoDeliveryServices(_config);

    services.AddUmbraco(_env, _config)
        .AddBackOffice()
        .AddWebsite()
        .AddComposers()
        .AddUmbracoDelivery()
        .AddAzureBlobMediaFileSystem()
        .Build();

And Startup.Configure() like this:

    app.UseUmbracoDelivery();
    app.UseResponseCompression();

    app.UseUmbraco()
        .WithMiddleware(u =>
        {
            u.UseBackOffice();
            u.UseWebsite();
        })
        .WithEndpoints(u =>
        {
            u.UseInstallerEndpoints();
            u.UseBackOfficeEndpoints();
            u.UseWebsiteEndpoints();
        });

Design Goals

  • Minimal Installation and Configuration requirements. As far as possible, you should be able to Install Kruso.Umbraco.Delivery and start developing.
  • Respect how Umbraco works. Use umbraco as you would expect as a content editor or developer. Kruso.Umbraco.Delivery will only return Json for a page if you want it to.
  • Performance. Json documents should be returned fast and Umbraco should continue to scale well.
  • Support Small Sites and Large. Many smaller sites use Umbraco as a place to implement other backend functions not related to the CMS, such as fetching data from external system. Allow developers to modify the Json data to include custom data.

Main features

As far as possible Umbraco.Delivery will work out of the box without further configuration, even for a multi-site and multi-language setup.

History

This package is mainly the work of @EdSoanes. It has been used in several solutions during several years, from Umbraco v8 to the latest v11. This library has recently received several new features, but the core functionality is well battle tested. It was made public as Kruso.Umbraco.Delivery because we at Kruso love open source, and want to contribute to the community. It also keeps us on our toes when we know others will look at our code 😉.

How to use

Please read the wiki.
Some features may not be well documented. You are welcome to open an issue if you have any questions.

Possible roadmap

  • Include a basic ISearchQuery. Menaing that basic search will be enabled without any coding needed.
  • Simpler preview without the need for a certificate. Will be ok for sites without very high security requirements.