fix(sitemap)

-Fix BlogCategory loc in site map
release
Amir Hossein Khademi 2024-05-28 11:27:44 +03:30
parent 51721e3c50
commit 8c6c4aebc1
1 changed files with 3 additions and 3 deletions

View File

@ -107,7 +107,7 @@ public class SiteMapService : ISiteMapService
await CreateCategoriesSiteMapsAsync(); await CreateCategoriesSiteMapsAsync();
await CreateProductsSiteMapsAsync(); await CreateProductsSiteMapsAsync();
await CreateBlogsSiteMapsAsync(); await CreateBlogsSiteMapsAsync();
await CreateBrandsSiteMapsAsync(); //await CreateBrandsSiteMapsAsync();
await CreateBlogCategoriesSiteMapsAsync(); await CreateBlogCategoriesSiteMapsAsync();
await CreatePagesSiteMapsAsync(); await CreatePagesSiteMapsAsync();
@ -564,7 +564,7 @@ public class SiteMapService : ISiteMapService
root.AppendChild(urlElement); root.AppendChild(urlElement);
XmlElement loc = doc.CreateElement("loc", doc.DocumentElement?.NamespaceURI); XmlElement loc = doc.CreateElement("loc", doc.DocumentElement?.NamespaceURI);
loc.InnerText = Path.Combine($"{_siteSetting.WebSiteUrl}/blogs/{blogCategory.Id}/{blogCategory.Slug}"); loc.InnerText = Path.Combine($"{_siteSetting.WebSiteUrl}/blogs?blogCategoryId={blogCategory.Id}");
urlElement.AppendChild(loc); urlElement.AppendChild(loc);
XmlElement lastmod = doc.CreateElement("lastmod", doc.DocumentElement?.NamespaceURI); XmlElement lastmod = doc.CreateElement("lastmod", doc.DocumentElement?.NamespaceURI);