fixed article links in sitemap
This commit is contained in:
parent
4bc822d993
commit
b1abe1c0f8
|
@ -3,6 +3,7 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Wave.Data;
|
||||
using Wave.Utilities;
|
||||
|
||||
namespace Wave.Controllers;
|
||||
|
||||
|
@ -66,8 +67,7 @@ public class RssController(IOptions<Customization> customizations, ApplicationDb
|
|||
var item = new SyndicationItem(
|
||||
article.Title,
|
||||
new TextSyndicationContent(article.BodyHtml, TextSyndicationContentKind.Html),
|
||||
new Uri(host,
|
||||
$"/{article.PublishDate.Year}/{article.PublishDate.Month:D2}/{article.PublishDate.Day:D2}/{Uri.EscapeDataString(article.Title.ToLowerInvariant()).Replace("-", "+").Replace("%20", "-")}"),
|
||||
new Uri(ArticleUtilities.GenerateArticleLink(article, host)),
|
||||
new Uri(host, "article/" + article.Id).AbsoluteUri,
|
||||
article.PublishDate) {
|
||||
Authors = {
|
||||
|
|
Loading…
Reference in a new issue