fix(blog): fix rss permalink

This commit is contained in:
Oliver Booth 2023-08-20 14:23:50 +01:00
parent 0e583de316
commit ffaa2b2fa4
Signed by: oliverbooth
GPG Key ID: B89D139977693FED
2 changed files with 23 additions and 5 deletions

View File

@ -20,7 +20,7 @@ public sealed class BlogItem
public string PubDate { get; set; } = default!; public string PubDate { get; set; } = default!;
[XmlElement("guid")] [XmlElement("guid")]
public string Guid { get; set; } = default!; public BlogItemGuid Guid { get; set; } = default!;
[XmlElement("description")] [XmlElement("description")]
public string Description { get; set; } = default!; public string Description { get; set; } = default!;

View File

@ -0,0 +1,18 @@
using System.Xml.Serialization;
namespace OliverBooth.Data.Blog.Rss;
public struct BlogItemGuid
{
public BlogItemGuid()
{
}
[XmlAttribute("isPermaLink")]
public bool IsPermaLink { get; set; } = false;
[XmlText]
public string Value { get; set; } = default!;
public static implicit operator BlogItemGuid(string value) => new() { Value = value };
}