statiqdev / Statiq.Framework

A flexible and extensible static content generation framework for .NET.
https://statiq.dev/framework
MIT License
426 stars 74 forks source link

IMetadataConversionExtensions.GetList<T> is not working with yaml #275

Open OskarKlintrot opened 8 months ago

OskarKlintrot commented 8 months ago

I wanted to pass an array of strings to a module so I added them in themesettings.yml

AssetsToIgnoreInDocumentJson: [staticwebapp.config.json]

Then I tried to retrieve them:

var ignore = context.Settings.GetList<string>("AssetsToIgnoreInDocumentJson", []);

However, ignore == null. In context.Settings I can see that staticwebapp.config.json is paired to AssetsToIgnoreInDocumentJson:0. It's not wrong per se but it doesn't play nicely with IMetadataConversionExtensions.GetList<T>.