Use combined RSS feed items
TaxBaik CI/CD / build-and-deploy (push) Successful in 1m22s

This commit is contained in:
2026-07-11 15:37:50 +09:00
parent 228dc6683d
commit fb3ee4aad6
3 changed files with 70 additions and 16 deletions
+8 -8
View File
@@ -14,20 +14,20 @@
rssContent.AppendLine($" <lastBuildDate>{Model.LastBuildDate}</lastBuildDate>");
rssContent.AppendLine(" <ttl>60</ttl>");
foreach (var post in Model.Posts)
foreach (var item in Model.Items)
{
var postUrl = $"https://www.taxbaik.com/blog/{Uri.EscapeDataString(post.Slug)}";
var fullDescription = post.Content ?? string.Empty;
var itemUrl = item.Link;
var fullDescription = item.Description ?? string.Empty;
var safeDescription = fullDescription.Replace("]]>", "]]]]><![CDATA[>");
rssContent.AppendLine(" <item>");
rssContent.AppendLine($" <title>{System.Net.WebUtility.HtmlEncode(post.Title)}</title>");
rssContent.AppendLine($" <link>{postUrl}</link>");
rssContent.AppendLine($" <guid isPermaLink=\"true\">{postUrl}</guid>");
rssContent.AppendLine($" <title>{System.Net.WebUtility.HtmlEncode(item.Title)}</title>");
rssContent.AppendLine($" <link>{itemUrl}</link>");
rssContent.AppendLine($" <guid isPermaLink=\"true\">{item.Guid}</guid>");
if (post.PublishedAt is not null)
if (item.PublishedAt is not null)
{
rssContent.AppendLine($" <pubDate>{post.PublishedAt.Value.ToUniversalTime():R}</pubDate>");
rssContent.AppendLine($" <pubDate>{item.PublishedAt.Value.ToUniversalTime():R}</pubDate>");
}
rssContent.AppendLine($" <description><![CDATA[{safeDescription}]]></description>");