This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

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

AnchorId string
The heading's anchor id (for deep-linking), or null for the lead section.
Crumbs IReadOnlyList<string>
Ancestor heading texts (excluding this heading and the page title), nearest-last.
IsLead bool
True for the page-lead section (content before the first heading).
Level int
The heading level (2–6), or 1 for the lead section.
Text string
Plain-text content of the section, whitespace-collapsed.
Title string
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

AnchorId string
The heading's anchor id (for deep-linking), or null for the lead section.
Title string
The heading text, or empty for the lead section (the host supplies the page title).
Level int
The heading level (2–6), or 1 for the lead section.
Crumbs IReadOnlyList<string>
Ancestor heading texts (excluding this heading and the page title), nearest-last.
Text string
Plain-text content of the section, whitespace-collapsed.
IsLead bool
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; }
}