Skip to content

Commit

Permalink
🐛 #109: Correct namespace of attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharp0802 committed Sep 26, 2024
1 parent 540ef89 commit c316455
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sika.core/Components/GoogleSitemapLinker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class GoogleSitemapLinker(Project project) : ILinker, IDisposable

public void Dispose()
{
var urlSet = new XElement(_ns + "urlset", _urls.OrderBy(url => url.Attribute("loc")!.Value));
var urlSet = new XElement(_ns + "urlset", _urls.OrderBy(url => url.Attribute(_ns + "loc")!.Value));
File.WriteAllText(
Path.Combine(project.Info.SiteDirectory, "sitemap.xml"),
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + urlSet.ToString(SaveOptions.OmitDuplicateNamespaces));
Expand Down

0 comments on commit c316455

Please sign in to comment.