v4.2.1 Release: Cascading Effects

2024-06-20

We're excited to announce the release of SuCoS v4.2.0! This version introduces powerful new features that will streamline your static site generation process and provide more control over your site's configuration.

Cascading Front Matter

In an effort to make site configuration more efficient, we've introduced the cascade feature in the front matter. This new feature allows you to propagate settings to the content's children, reducing the need for repetitive configuration.

Here's an example of how to use the cascade feature:

---
Title: Blog
Cascade:
    Weight: 1
    Draft: true
    Params:
        subtitle: "article"
---

In this example, the Weight, Draft, and subtitle properties will be inherited by all children of the "Blog" section. This feature is particularly useful when you want to apply consistent settings across multiple pages without having to define them individually.

New sucos Variable for Templates

We've added a new sucos variable for templates, which contains useful information about your site and the SuCoS. The sucos variable includes the following properties:

  • IsServer: Indicates whether the site is being served by the SuCoS server.
  • DotNetVersion: The version of the .NET runtime being used by SuCoS.
  • Version: The version of the SuCoS.
  • BuildDate: The build date of the SuCoS.

You can use these properties in your templates to display relevant information or conditionally render content based on the environment.

For example, you can display the SuCoS version in the footer of your site using the following Liquid code:

Powered by SuCoS {{ sucos.Version }}

Download It Now

Commits