-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds link to Umbraco specific docs and alters docs to md (#1)
* Adds link to Umbraco specific docs
- Loading branch information
Showing
3 changed files
with
49 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> | ||
<system.webServer> | ||
<handlers> | ||
<add name="Sitemapify" path="sitemap.xml" verb="GET" type="Sitemapify.SitemapifyHttpHandler, Sitemapify" /> | ||
</handlers> | ||
</system.webServer> | ||
</configuration> | ||
|
||
|
||
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: | ||
|
||
<appSettings> | ||
<add key="Sitemapify.Umbraco:ExcludedFromSitemapPropertyAlias" value="newPropertyAlias" /> | ||
<add key="Sitemapify.Umbraco:ExcludedChildrenFromSitemapPropertyAlias" value="anotherPropertyAlias" /> | ||
</appSettings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters