Skip to content

Commit

Permalink
Specify System.Xml
Browse files Browse the repository at this point in the history
  • Loading branch information
IanWold committed Oct 30, 2023
1 parent d20043a commit 11cce73
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build.csx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ using System.Text;
using System.Text.RegularExpressions;
using System.ServiceModel.Syndication;
using System.IO;
using System.Xml;

new MetalsharpProject()
.AddInput("Site", @".\")
Expand Down Expand Up @@ -53,11 +54,11 @@ new MetalsharpProject()
.UseLeveller()
.Use(project =>
{
var rssItems = new List<System.ServiceModel.Syndication.SyndicationItem>();
var rssItems = new List<SyndicationItem>();

foreach (var post in project.OutputFiles.Where(f => f.Directory.StartsWith(@".\Posts") && f.Metadata.TryGetValue("contents", out object isContentsObject) && isContentsObject is bool isContents && isContents))
{
rssItems.Add(new System.ServiceModel.Syndication.SyndicationItem(
rssItems.Add(new SyndicationItem(
post.Metadata["title"].ToString(),
post.Text,
new Uri($"https://ian.wold.guru/Posts/{post.Name}.html"),
Expand Down Expand Up @@ -131,7 +132,7 @@ new MetalsharpProject()
}

var rssFeedContent = string.Empty;
var rssFeed = new System.ServiceModel.Syndication.SyndicationFeed(
var rssFeed = new SyndicationFeed(
"Ian Wold",
"Ian Wold's Blog",
new Uri("https://ian.wold.guru/feed.xml"),
Expand Down

0 comments on commit 11cce73

Please sign in to comment.