Skip to content

Commit

Permalink
Adds link to Umbraco specific docs and alters docs to md (#1)
Browse files Browse the repository at this point in the history
* Adds link to Umbraco specific docs
  • Loading branch information
Philo authored Aug 16, 2016
1 parent 7759db6 commit bcee86c
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 60 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -61,3 +68,42 @@ public interface ISitemapDocumentBuilder
XDocument BuildSitemapXmlDocument(IEnumerable<SitemapUrl> 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
<appSettings>
<add key="Sitemapify.Umbraco:ExcludedFromSitemapPropertyAlias" value="newPropertyAlias" />
<add key="Sitemapify.Umbraco:ExcludedChildrenFromSitemapPropertyAlias" value="anotherPropertyAlias" />
</appSettings>
```
47 changes: 2 additions & 45 deletions src/Sitemapify.Umbraco/readme.txt
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>
16 changes: 1 addition & 15 deletions src/Sitemapify/readme.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:

<configuration>
<system.webServer>
<handlers>
<add name="Sitemapify" path="sitemap.xml" verb="GET" type="Sitemapify.SitemapifyHttpHandler, Sitemapify" />
</handlers>
</system.webServer>
</configuration>

0 comments on commit bcee86c

Please sign in to comment.