ApiReferenceRegistrationOptions
Pennington.DocSite.Api
Per-registration options passed to AddApiReference.
Properties
RoutePrefixstring- URL prefix under which this reference tree's pages are served. Leading and trailing slashes are normalized automatically. Examples:
"/reference/api/","/api/","/api/spectre-cli/". Defaults to"/reference/api/". SearchPriorityint- Search priority for every page under this tree's
RoutePrefix, registered intoSearchIndexOptions.PrefixPrioritiesso it populates the indexpfield. Lower ranks later. Defaults to3— below typical prose so generated reference pages don't bury conceptual articles that match the same term. TocSectionLabelstring- Section label the TOC entry is grouped under in the sidebar. Leave
nullto keep the entry unsectioned. Set to a string that matches another page'ssectionLabelto join that section. TocTitlestring- Sidebar title for the single TOC entry pointing at this registration's index page. Set to
nullto suppress the TOC entry entirely (the pages still publish). Defaults to"API reference".
Pennington.DocSite.Api.ApiReferenceRegistrationOptions
namespace Pennington.DocSite.Api;
/// Per-registration options passed to AddApiReference.
public class ApiReferenceRegistrationOptions
{
/// URL prefix under which this reference tree's pages are served. Leading and trailing slashes are normalized automatically. Examples: "/reference/api/", "/api/", "/api/spectre-cli/". Defaults to "/reference/api/".
public string RoutePrefix { get; set; }
/// Search priority for every page under this tree's RoutePrefix, registered into SearchIndexOptions.PrefixPriorities so it populates the index p field. Lower ranks later. Defaults to 3 — below typical prose so generated reference pages don't bury conceptual articles that match the same term.
public int SearchPriority { get; set; }
/// Section label the TOC entry is grouped under in the sidebar. Leave null to keep the entry unsectioned. Set to a string that matches another page's sectionLabel to join that section.
public string TocSectionLabel { get; set; }
/// Sidebar title for the single TOC entry pointing at this registration's index page. Set to null to suppress the TOC entry entirely (the pages still publish). Defaults to "API reference".
public string TocTitle { get; set; }
}