This commit is contained in:
tparnell
2019-02-06 22:32:14 -05:00
parent ca0344c902
commit be5c4cc806

View File

@@ -11,13 +11,15 @@ namespace TerribleDev.Blog.Web
{
public static SyndicationItem ToSyndicationItem(this IPost x)
{
return new SyndicationItem()
Uri.TryCreate($"https://blog.terribledev.io/{x.Url}", UriKind.Absolute, out var url);
var syn = new SyndicationItem()
{
Title = x.Title,
Description = x.Content.ToString(),
Id = $"https://blog.terribledev.io/{x.Url}",
Id = url.ToString(),
Published = x.PublishDate
};
syn.AddLink(new SyndicationLink(url));
}
}
}