HeadingSection Pennington.Search
One heading-delimited section of a rendered page: a heading plus the text beneath it, down to the next heading of the same or higher level. The text before the first heading is the IsLead section.
Properties
AnchorIdstring- The heading's anchor id (for deep-linking), or null for the lead section.
CrumbsIReadOnlyList<string>- Ancestor heading texts (excluding this heading and the page title), nearest-last.
IsLeadbool- True for the page-lead section (content before the first heading).
Levelint- The heading level (2–6), or 1 for the lead section.
Textstring- Plain-text content of the section, whitespace-collapsed.
Titlestring- The heading text, or empty for the lead section (the host supplies the page title).
Constructors
HeadingSection
#public HeadingSection(string AnchorId, string Title, int Level, IReadOnlyList<string> Crumbs, string Text, bool IsLead)
One heading-delimited section of a rendered page: a heading plus the text beneath it, down to the next heading of the same or higher level. The text before the first heading is the IsLead section.
Parameters
AnchorIdstring- The heading's anchor id (for deep-linking), or null for the lead section.
Titlestring- The heading text, or empty for the lead section (the host supplies the page title).
Levelint- The heading level (2–6), or 1 for the lead section.
CrumbsIReadOnlyList<string>- Ancestor heading texts (excluding this heading and the page title), nearest-last.
Textstring- Plain-text content of the section, whitespace-collapsed.
IsLeadbool- True for the page-lead section (content before the first heading).
Pennington.Search.HeadingSection
namespace Pennington.Search;
/// One heading-delimited section of a rendered page: a heading plus the text beneath it, down to the next heading of the same or higher level. The text before the first heading is the IsLead section.
public record HeadingSection
{
/// The heading's anchor id (for deep-linking), or null for the lead section.
public string AnchorId { get; set; }
/// Ancestor heading texts (excluding this heading and the page title), nearest-last.
public IReadOnlyList<string> Crumbs { get; set; }
/// One heading-delimited section of a rendered page: a heading plus the text beneath it, down to the next heading of the same or higher level. The text before the first heading is the IsLead section.
public HeadingSection(string AnchorId, string Title, int Level, IReadOnlyList<string> Crumbs, string Text, bool IsLead)
;
/// True for the page-lead section (content before the first heading).
public bool IsLead { get; set; }
/// The heading level (2–6), or 1 for the lead section.
public int Level { get; set; }
/// Plain-text content of the section, whitespace-collapsed.
public string Text { get; set; }
/// The heading text, or empty for the lead section (the host supplies the page title).
public string Title { get; set; }
}