Skip to content

Commit 84c054f

Browse files
committed
Introduced new Extended action
The new `Extended()` action is simply a shortcut to the previously introduced `includeMetadata` (87b6d1b), which will, by default, be routed from `/Sitemap/Extended` (assuming e.g. `MapDefaultControllerRoute()`). This will output the same sitemap as was previously output, with `<PageMap>` and `<DataObject>`s representing (most) attributes and relationships for every topic. This dramatically increases the size of the XML, but provides useful metadata for any agents that might support it.
1 parent 87b6d1b commit 84c054f

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

OnTopic.AspNetCore.Mvc/Controllers/SitemapController.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,21 @@ public virtual ActionResult Index(bool indent = false, bool includeMetadata = fa
120120

121121
}
122122

123+
/*==========================================================================================================================
124+
| GET: /SITEMAP/EXTENDED
125+
\-------------------------------------------------------------------------------------------------------------------------*/
126+
/// <summary>
127+
/// Provides the Sitemap.org sitemap for the site, including extended metadata attributes.
128+
/// </summary>
129+
/// <remarks>
130+
/// Introducing the metadata makes the sitemap considerably larger. However, it also means that some agents will index the
131+
/// additional information and make it available for querying. For instance, the (now defunct) Google Custom Search Engine
132+
/// (CSE) would previously allow queries to be filtered based on metadata attributes exposed via the sitemap.
133+
/// </remarks>
134+
/// <param name="indent">Optionally enables indentation of XML elements in output for human readability.</param>
135+
/// <returns>A Sitemap.org sitemap.</returns>
136+
public virtual ActionResult Extended(bool indent = false) => Index(indent, true);
137+
123138
/*==========================================================================================================================
124139
| METHOD: GENERATE SITEMAP
125140
\-------------------------------------------------------------------------------------------------------------------------*/

0 commit comments

Comments
 (0)