Resource Manifest source generator, Orchard Core Pair Programming by Lombiq - This week in Orchard (10/05/2024)

Add extensions to register conditions in the Rules module, add Redis Health Check, demo about the Resource Manifest source generator, and don't forget to join our next Orchard Core Pair Programming session! Let's see the details!

Orchard Core updates

Add extensions to register conditions in the Rules module

Here is a summary of the changes:

  • Added new OrchardCore.Rules.Core project.
  • Added the new AddRule<> extensions in the Core project.
  • Cleaned up the OrchardCore.Rules project by using the new extensions.

And it means that now, you can simplify your code by using the newly added extensions to register custom conditions. For example,

services.AddRule<HomepageCondition, HomepageConditionEvaluator, HomepageConditionDisplayDriver>();

Add extensions to register conditions in the Rules module

Add Redis Health Check

This new feature provides the Redis health check to report the status of the Redis server if Redis is enabled. The health check endpoint is available at /health/live for each tenant that needs to be checked. More information about health checks in ASP.NET Core can be found here: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks

Add Redis Health Check

Demos

Resource Manifest source generator

If we look at the ResorceManagementOptionsConfiguration today, it has a lot of resources including styles and scripts, and all are hard-coded. The big problem here is the URLs, a lot of times we find bugs for outdated or wrong CDN URLs. Instead of hard-coding all the resources, this PR's goal is to create a JSON file that contains the references for all the scripts and styles.

If we go to the ResorceManagementOptionsConfiguration, you can see the usage of the ResourceManifestGenerator, which will get all the data from the resources.json file and add them to the resources directly.

The ResourceManifestGenerator

So, in a nutshell, just have a JSON file that contains the references for all the scripts and styles, and the ResourceManifestGenerator will get all the data from that resources.json file and add them to the resources directly. And if you are curious about this concept, head to YouTube for a demo!

News from the community

Theme development with Zig - Orchard Core Pair Programming by Lombiq

Last Monday, we had the very first session of Orchard Core Pair Programming by Lombiq! In these, we do an hour of pair programming with an Orchard Core community member about a project of theirs. We learn together a lot, share best practices, and write some good code. All this is live, and you can join us with your questions! This time, Ermir Pellumbi aka Zig joined us with a theme project. If you missed the session, you can find the recording here.

And we will have the next session of Orchard Core pair programming next Monday! Ermir Pellumbi (Zig) joins us with a theme project again. We learn a lot, share best practices, and write good code. Your host and the "navigator" of the pair programming session will be Zoltán Lehóczky from Lombiq. All this is live, you can join us too! Check it out here. Remember: 5 PM UTC on the 13th!

Theme development with Zig - Orchard Core Pair Programming by Lombiq

Orchard Dojo Newsletter

Lombiq's Orchard Dojo Newsletter has 470 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course.

Do you know of other Orchard enthusiasts who would like to read our weekly articles? Tell them to subscribe here!

If you are interested in more news about Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!