Skip to content

Simple sitemap generator. Image and SiteMapIndex are supported.

License

Notifications You must be signed in to change notification settings

rightek/rightek.sitemap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rightek.Sitemap

Simple sitemap generator. Image and SiteMapIndex are supported.

Basic Usage

ISitemapGenerator sitemapGenerator = new SitemapGenerator();

var urlSet = new UrlSet();
urlSet.Items.Add(new Url
{
	ChangeFrequency = ChangeFrequency.monthly,
	Location = "http://example.com",
	LastModified = DateTime.Now.AddDays(-1),
	Priority = .5
});

var sitemap = sitemapGenerator.GetXml(urlset);

Output:

<?xml version="1.0" encoding="utf-16"?>
<urlset xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>http://example.com</loc>
    <lastmod>2020-02-29T12:49:29.1233504+03:30</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
  </url>
</urlset>

Nuget nuget stats

PM> Install-Package Rightek.Sitemap

License

MIT


Made with ♥ by people @ Rightek

About

Simple sitemap generator. Image and SiteMapIndex are supported.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages