diff --git a/build.csx b/build.csx index a1dc399..c5ada83 100644 --- a/build.csx +++ b/build.csx @@ -153,10 +153,11 @@ new MetalsharpProject() } } - if (post.Metadata.TryGetValue("topics", out var topicsObject) && topicsObject is IEnumerable topicNames) + if (post.Metadata.TryGetValue("topics", out var topicsObject) && topicsObject is JsonElement topicNamesElement) { - foreach (var topicName in topicNames) + foreach (var topicNameElement in topicNamesElement.EnumerateArray()) { + var topicName = topicNameElement.GetString(); if (topicPosts.TryGetValue(topicName, out var topicPostsList)) { seriesPosts[topicName] = [ ..topicPostsList, post.Metadata ];