---
title: "What's New in xStatic 2?"
description: "Upgrading xStatic to work on Umbraco 9 wasn't just a case of updating some NuGet packages... here's what's new."
url: https://www.sammullins.co.uk/articles/what-s-new-in-xstatic-2/
date: 2021-10-26
updated: 2026-11-29
authorship: Sam
---

# What's New in xStatic 2?

Upgrading xStatic to work on Umbraco 9 wasn't just a case of updating some NuGet packages... here's what's new.

## 1\. NuGet only

You can now install xStatic via NuGet, or more accurately you must! As part of this the plugins have been separated so you only need to install what you want.

**xStatic**

This is the package to install the static site generation functionality into your Umbraco website. 

**xStatic.Core**

This is the package to reference if you want to build your own deployers, transformers, generators etc. It contains a lot of the logic and interface classes used by the plugin.

**xStatic.\***

All other packages that start with xStatic are plugins; these will add certain functionality into your xStatic installation. Examples of this are xStatic.Netlify, xStatic.Git, and xStatic.Ftp.

![The NuGet package manager in Visual Studio listing the xStatic, xStatic.Netlify, xStatic.Ftp, xStatic.Git and xStatic.Core packages](https://www.sammullins.co.uk/_astro/xstatic-packages.C7jJTFf8.avif)

## 2\. You need to write code to make it work

In v1 of xStatic you didn't have to write a single line of code in order to start generating static versions of your Umbraco sites. This is no longer the case.

In order to get xStatic working in Umbraco 9 and still follow .Net 5 best practice you'll now have open an IDE. Don't fret though, it is only one single line in your Startup.cs file.

```
services.AddXStatic().Automatic().Build();
```

This line installs all the required services and automatically discovers what plugin components have been installed.

This allows coders to override the default classes with their own instances if required.

## 3\. No more dependencies

The xStatic plugin no longer relies on any other Umbraco packages. This means that it can now be used by gold partners and on Umbraco Cloud without any restrictions.

## 4\. No more JSON config file.

In v1, customisation of xStatic required the editing of a JSON file; if this JSON file was changed and xStatic was upgraded this would be overwritten which was a nuisance. 

This file no longer exists and has been replaced with more standard C# code or user friendly dashboards.

## 5\. CMS editable export types

Export types are the components that control how a static site will be generated when the build button is pressed. Previously these could only be changed by editing the config file, but this has now been replaced by a database table and editing interface inside Umbraco.

This makes it much easier to create your own generators as well as being able to make make changes without a code deployment.

- ![The xStatic Export Types screen in Umbraco, listing HTML Website and Json export types with their generator, transformer and file name settings](https://www.sammullins.co.uk/_astro/xstatic-export-types.D8dY4yK3.avif)
- ![The Edit Export Type dialog in xStatic, with dropdowns for the transformer list factory, generator and file name generator](https://www.sammullins.co.uk/_astro/xstatic-export-type.BVgpDwRr.avif)

## 6\. Post generation actions

A new feature added in the v2 release are 'Actions'. These are components that can be configured to run some extra processing once the site generation has completed. Built into the core package are actions for renaming, copying, or deleting files; the Netlify package has a specific action for creating the 404 page.

It is really easy to create your own actions, simply implement the IPostGenerationAction interface's single RunAction method.

These actions can specify a configuration model that will allow editors to configure them in the CMS. This allows you to run similar actions multiple times on a single site or reuse actions on multisite.

Actions are perfect for final file alterations, generating sitemaps, sending notifications, and hopefully many more examples that I haven't listed here.

- ![The xStatic Actions screen in Umbraco, showing a Not Found action that renames 404/index.html and a Netlify 404 action](https://www.sammullins.co.uk/_astro/xstatic-actions.C6DYXCZT.avif)
- ![The Edit Action dialog in xStatic, set to FileRenameAction with a file path and a new file path](https://www.sammullins.co.uk/_astro/xstatic-action-1.BQXJ2QLy.avif)

## 7\. Settings tab

Now that the packages are separated, a new section has been added to help with working out what components are installed.

![The xStatic Technical Settings screen, listing the installed generators, transformer list factories, deployers, file name generators and post-generation actions](https://www.sammullins.co.uk/_astro/xstatic-config.TQelJg2G.avif)

- [xStatic for Umbraco](https://www.sammullins.co.uk/software/xstatic-for-umbraco/): xStatic is a free Umbraco package that generates static HTML sites from Umbraco content. This allows for very cheap and fast hosting of simple sites.
- [Building your first static site](https://mulliman.github.io/xStatic-for-Umbraco/Your-First-Static-Site.html): Setting up xStatic is easy, and following these steps you can configure your first static site within minutes.
- [Extending xStatic](https://mulliman.github.io/xStatic-for-Umbraco/Extending-xStatic.html): You can extend xStatic to generate and transform the output to fit your specific requirements.
