diff --git a/README.md b/README.md index afcce06..eda53fd 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,14 @@ # Sitemapify Provides a ASP.NET HttpHandler to assist with generating a dynamic sitemap.xml file +There is also an Umbraco specific extension to Sitemapify that supports building the sitemap from Umbraco CMS content. See [Sitemapify.Umbraco](#sitemapifyumbraco-configuration) for further documentation + ## Installation + +``` +Install-Package Sitemapify +``` + The installation process should have updated your web.config file to include a httphandler to process requests to `sitemap.xml`, it should look similar to: ```xml @@ -61,3 +68,42 @@ public interface ISitemapDocumentBuilder XDocument BuildSitemapXmlDocument(IEnumerable sitemapUrls); } ``` + +## Sitemapify.Umbraco Configuration + +Firstly install the Umbraco extension: + +``` +Install-Package Sitemapify.Umbraco +``` + +Once you have installed Sitemapify.Umbraco you can create an ApplicationEventHandler to configure Sitemapify to use the available "Umbraco Content Provider" to generate sitemap url that form the sitemap.xml. + +```c# +public class SitemapifyApplicationEventHandler : ApplicationEventHandler +{ + protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) + { + Configure.With(config => config + .UsingContentProvider(new SitemapifyUmbracoContentProvider()) + ); + } + + protected override bool ExecuteWhenApplicationNotConfigured { get; } = false; + protected override bool ExecuteWhenDatabaseNotConfigured { get; } = false; +} +``` + +By default the Umbraco content provider will look for content node properties with specific names to determine whether a particular node should be included in the generated sitemap file, these property names are: + +* `umbracoNaviHide` - True/False to determine whether this node is included (Default: false) +* `sitemapifyExcludeChildren` - True/False to determine whether to ignore all child nodes below this node (Default: false) + +If you want to alter these property aliases you can override them via application settings: + +```xml + + + + +``` diff --git a/src/Sitemapify.Umbraco/readme.txt b/src/Sitemapify.Umbraco/readme.txt index 9bcab6e..6882ede 100644 --- a/src/Sitemapify.Umbraco/readme.txt +++ b/src/Sitemapify.Umbraco/readme.txt @@ -1,53 +1,10 @@ -Sitemapify +Sitemapify.Umbraco ~~~~~~~~~~ -Provides a ASP.NET HttpHandler to assist with generating a dynamic sitemap.xml file +Provides a ASP.NET HttpHandler to assist with generating a dynamic sitemap.xml file for Umbraco CMS content nodes Project website ~~~~~~~~~~~~~~~ Visit https://github.com/stormid/Sitemapify for documentation and issues - - -Installation -~~~~~~~~~~~~ - -The installation process should have updated your web.config file to include a httphandler to process requests to /sitemap.xml, it should look similar to: - - - - - - - - - - -Configuration -~~~~~~~~~~~~~ - -Once installed you can create an ApplicationEventHandler to configure Sitemapify to use the available "Umbraco Content Provider" to generate sitemap url that form the sitemap.xml: - -public class SitemapifyApplicationEventHandler : ApplicationEventHandler -{ - protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) - { - Configure.With(config => config.UsingContentProvider(new SitemapifyUmbracoContentProvider())); - } - - protected override bool ExecuteWhenApplicationNotConfigured { get; } = false; - protected override bool ExecuteWhenDatabaseNotConfigured { get; } = false; -} - -By default the Umbraco content provider will look for content node properties with specific names to determine whether a particular node should be included in the generated sitemap file, these property names are: - -* umbracoNaviHide - True/False to determine whether this node is included (Default: false) -* sitemapifyExcludeChildren - True/False to determine whether to ignore all child nodes below this node (Default: false) - -If you want to alter these property aliases you can override them via application settings: - - - - - \ No newline at end of file diff --git a/src/Sitemapify/readme.txt b/src/Sitemapify/readme.txt index 1ada777..bfd4204 100644 --- a/src/Sitemapify/readme.txt +++ b/src/Sitemapify/readme.txt @@ -1,4 +1,4 @@ -Sitemapify.Umbraco +Sitemapify ~~~~~~~~~~ Provides a ASP.NET HttpHandler to assist with generating a dynamic sitemap.xml file for Umbraco CMS content nodes @@ -8,17 +8,3 @@ Project website ~~~~~~~~~~~~~~~ Visit https://github.com/stormid/Sitemapify for documentation and issues - - -Installation -~~~~~~~~~~~~ - -The installation process should have updated your web.config file to include a httphandler to process requests to /sitemap.xml, it should look similar to: - - - - - - - - \ No newline at end of file