The major change in this release is the inclusion of BaseURL in permalinks. This change provides more consistent URL handling across your site, especially when deploying to subdirectories or custom domains.
Previously, Permalink would return a URL relative to your site root. Now, it includes the BaseURL, giving you absolute URLs out of the box. For those who need the old behavior, we've kept it accessible via RelPermalink.
This change makes it easier to:
Generate absolute URLs for social media cards
Create proper RSS feeds
Handle subdirectory deployments seamlessly
Migration Guide
If you're upgrading from v5, here's what you need to know:
Replace Permalink with RelPermalink where you need URLs relative to your site root
Keep using Permalink where you want absolute URLs (recommended for RSS feeds and social media cards)
Remember our previous URL handling improvements mentioned in v5.0.0? This change builds upon that foundation to provide even more robust URL management.
The most significant change in this release is our upgrade to .NET 9. The upgrade necessitated a bit of internal changes and is the primary reason for the major version increment.
Unlike many other project's strategy of waiting for Long-Term Support (LTS) releases, we're committed to using the latest .NET release. Why? Because Microsoft provides the same level of robustness and stability across all .NET versions. This approach ensures we're always leveraging the most recent performance improvements, language features, and runtime optimizations.
Output Formats
Remember when SuCoS could only generate HTML? Those days are gone!
We're introducing a game-changing feature: multiple output formats! Now, each content type can generate various file types beyond HTML. This means you can easily create:
RSS Feeds
Robot.txt files
Sitemap XML
The templating system is now incredibly smart. You can create format-specific templates:
single.html.liquid: HTML-only template
single.xml.liquid: XML-only template
single.liquid: A universal fallback
Imagine generating a blog RSS feed with just a few configuration lines. Pure magic!
Front Matter Separation
The old Front Matter was getting complex, so we split it up following the Single Responsibility Principle. Meet ContentClass – our new comprehensive content representation that combines:
Front Matter (metadata)
Actual Content
File Metadata
Parsing Phase Optimization
Content Front Matter is now generated in a separate loop before page generation. This lays the groundwork for future enhancements, potentially allowing parsing without full page generation.
Dependency Updates
We've updated all dependencies to their latest versions as of December 2024. Notable updates include:
Fluid.Core: 2.11.1 → 2.14.0
YamlDotNet: 16.1.0 → 16.2.1
Markdig: 0.37.0 → 0.38.0
Microsoft Extensions packages: Updated to .NET 9 versions
A Note on CI/CD
Remember the trimming improvements we mentioned in v4.3.0? We've finally implemented the full build process optimization. GitLab CI/CD now creates even smaller, more efficient executables.
We're thrilled to announce the release of SuCoS v4.3.0! This update brings significant improvements in terms of efficiency and performance, making your experience even better.
One of the most exciting changes in this release is the significant reduction in the size of the SuCoS executable. We've managed to trim it down from about 80 MB to just 40 MB - that's a 50% reduction!
Method
Size
Before
~80 MB
After
~40 MB
Trimming Full
~30 MB
Native AOT
~25 MB
This impressive size reduction was achieved using dotnet publish trimming in partial mode. We opted for partial mode to keep some dependencies that can't work with full trimming untouched, which is why Native AOT is currently not possible for SuCoS. Interestingly, full trimming mode or Native AOT would have reduced the even more, but neither option was viable due to compatibility issues.
The smaller executable brings several benefits: faster downloads, quicker startup times, more efficient memory usage, and faster CI/CD executions. This optimization ensures you get all the power of SuCoS in a more compact and efficient package.
Updated Dependencies: Staying Current
To ensure that SuCoS continues to leverage the latest improvements and security updates from its underlying technologies, we've updated all dependencies to their latest versions as of August 2, 2024. Here's a quick overview of some key updates:
These updates include the latest .NET runtime improvements, an updated Liquid templating engine, and other third-party libraries used in SuCoS. By keeping our dependencies current, we ensure that SuCoS remains secure, efficient, and compatible with the broader ecosystem.
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.
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:
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:
We're thrilled to announce the release of SuCoS v4.1.0! This version brings exciting new features and improvements that will enhance your static site generation experience.
We've added two new Liquid templates, term.liquid and taxonomy.liquid, to further extend the list of available templates for theming. If these templates are missing, they will default to list.liquid. These new templates provide you with more flexibility and control when customizing the look and feel of your taxonomy and term pages.
term.liquid is used to customize the appearance of a single term page, such as a tag or category. You can now access term-specific data and tailor the layout to better suit the content.
taxonomy.liquid is used to customize the appearance of a taxonomy listing page, such as a list of all tags or categories. This template allows you to create a unique layout for each taxonomy type, making it easier for users to navigate and find the content they're looking for.
Case-Insensitive YAML Front Matter and Site Settings
In our ongoing efforts to improve usability, we've made YAML front matter and site settings case-insensitive. This change will make it easier for you to configure your site and reduce the potential for errors.
Previously, the YAML front matter and site settings were only valid if they used CamelCase to match the C# class properties counterparts. For example, to set the site title, you would need to use Title in your YAML configuration:
---
Title: My Page
---
With the new case-insensitive feature, you can now use any case when defining your YAML front matter and site settings. The following examples are now all valid and will correctly set the site title:
---
title: My Page 1
---
---
TITLE: My Page 1
---
---
tiTle: My Page 1
---
This change applies to all properties in the sucos.yaml and any content page.
Notice: in case of repeating values, the last one will prevail.
---
title: My Page 1
TITLE: My Page 2
tiTle: My Page 3 # This one will be used since it's the last
---
From a user's perspective, this might seem like a simple release, but don't be fooled! We've been hard at work behind the scenes to bring you significant improvements in both speed and stability.
We are excited to announce that JetBrains has kindly provided us with a license for their powerful C# IDE, Rider, and their static code analyzer, Qodana. This has allowed us to dive deep into our codebase and optimize it for even better performance.
Server Crash on Constant File Changes
Ever noticed that the app would sometimes crash when you were rapidly making changes to a content file? We've tracked down the issue and it turns out that each file change was triggering a duplicate server reload, eventually overwhelming the app. But worry no more - we've fixed this bug, and your rapid-fire edits should now be smooth sailing.
Stay tuned for more exciting updates in the near future!
We understand that reading through raw git logs can be a daunting task, so we've taken the time to create a changelog that's both human and machine-readable. This new changelog is handcrafted by our team to provide you with a clear and concise overview of each update. We hope you find it helpful!
Due to the ReadyToRun and Multiple themes features, there are some changes that users must be aware when upgrading their sites. More on that later.
Features
ReadyToRun
Recent DotNet versions allow a hybrid approach between compiled vs JIT compilation. It is called ReadyToRun. It tries to optimize the code converting some into native code and also make some inferences about the JIT optimizations.
The main advantage is speed. It will probably be about 2 times faster. It will also pave the way to further attempt to complete AOT compilation #35 , which would bring even more speed and smaller size.
However, it required some changes, specially in the YAML parser, because it needed to avoid Reflection.
BREAKING CHANGE: all page and site settings (YAML) that are not de default variables will be ignored. Only custom data present under Params: will be kept into your pages. Before, unknown values were automatically placed under Params, even if placed elsewhere.
Multiple themes
SuCoS now allow sites to install multiple themes (but still only use one). They will be placed inside a themes/ folder (or overwriting it using ThemeDir variable in the site settings sucus.yaml). It will also allow using nested git repositories and splitting the theme into other remote repositories.
BREAKING CHANGE: until now, the theme data was supposed to be placed in theme/ folder. Now, one must create a themes/ folder and put the theme data into a folder within it, like themes/my-theme
new theme terminal command
You can now scaffold the theme structure using the new SuCoS new theme command. It will -still- not populate with any generic theme, but it's the plan for the future.
CODE_OF_CONDUCT and CONTRIBUTING
The source code now has CODE_OF_CONDUCT and CONTRIBUTING documents. The first state the expected conduct for everything in the project, from users or maintainers. Respect, tolerance and a bit o humor are a must. The second contains instructions on ways to start contributing and making changes for yourself. Further instructions are in developer section of this site.
Fixes
404 page Exception
When using live server, if the 404 page is hit (non-existing page), the server was raising an exception and crashing.
Return 0 (success) for help and version
when calling SuCoS version or SuCoS help terminal commands, it was crashing.
Internal Organization
Some changes in the code that do not change the behavior of the app.
Nuke build project is now merged inside .nuke
All app commands are placed in Commands folder
Updated dependencies and libraries
Fixes and enhancements in code comments and code style
As I've mentioned in the v2.2.0 post, I forgot to mark the release as breaking change. It was so impactful that I was not able to even update this very site. Now I've decided to mark as a new version, signalling the need of changes of any client site.
Create a Site via Terminal
SuCoS newsite -o <PATH> will create a simple blank site.
Lighter Container Images
Using containers to build your site is one of many usages of the program. GitLab, GitHub, Netlify and Cloudflare allow specifying the site builder.
The base image will impact in the speed that the provider will download it to build your site. It was never a big size but it exposes the software to potential vulnerabilities.
The new images (now using both Microsoft modified Ubuntu and Alpine) are smaller and have less stuff into them. Win-win. For those that are using the latest, nothing changes.
Check Your Links (Beta)
It's now possible to check all the links of your site using the checklinks command. There are flags to check only internal or external links and to skip any given URL that are problematic. It's useful for the build process, making sure that your site is all valid.
Note
The "internal" flag, that scans the filesystem instead the URL might not work if your site uses Aliases or changes the name of the content.
Now the build command is implicit. Also, the --source option is now an argument, so one can call either build or serve and then the path directly. As before, the default is to assume the current path (./). The usage of --source or -s is still possible and will take precedent, for compatibility’s sake.
Now you can build a site just by calling SuCoS.
Elegant Crashes
When something goes wrong in the build or serve processes (and it most definitively, will), the program crashes. Well, we are not fixing anything here, but at least print the sh*t in a very delicate manner!