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