ResolvedContent Pennington.DocSite.Services
Rendered content plus the surrounding locale/fallback metadata needed to render a page.
Properties
Descriptionstring?- Default:
nullPage description from front matter. FallbackDefaultDisplayNamestring?- Default:
nullDisplay name for the locale actually served, shown in the fallback notice. FallbackRequestedDisplayNamestring?- Default:
nullDisplay name for the requested locale, shown in the fallback notice. Htmlstring- Rendered HTML body.
IsFallbackbool- Default:
falseTrue when content from the default locale was served because the requested locale had no match. Localestring- Default:
""Locale used to render the page (may differ from the requested locale when falling back). MetadataPennington.FrontMatter.IFrontMatter- Parsed front matter for the page.
OutlinePennington.Pipeline.OutlineEntry[]- Headings extracted from the body for the on-page outline.
RequestedLocalestring?- Default:
nullLocale the user originally requested, when different fromLocale. RoutePennington.Routing.ContentRoute- Canonical route for the resolved page.
Titlestring- Page title from front matter.
Constructors
.ctor
#public record ResolvedContent(
ContentRoute Route,
string Title,
string? Description,
string Html,
OutlineEntry[] Outline,
IFrontMatter Metadata,
string Locale = "",
bool IsFallback = false,
string? RequestedLocale = null,
string? FallbackRequestedDisplayName = null,
string? FallbackDefaultDisplayName = null
);Rendered content plus the surrounding locale/fallback metadata needed to render a page.
Parameters
RouteContentRoute- Canonical route for the resolved page.
Titlestring- Page title from front matter.
Descriptionstring?- Page description from front matter.
Htmlstring- Rendered HTML body.
OutlineOutlineEntry[]- Headings extracted from the body for the on-page outline.
MetadataIFrontMatter- Parsed front matter for the page.
Localestring (optional)- Locale used to render the page (may differ from the requested locale when falling back).
IsFallbackbool (optional)- True when content from the default locale was served because the requested locale had no match.
RequestedLocalestring? (optional)- Locale the user originally requested, when different from
Locale. FallbackRequestedDisplayNamestring? (optional)- Display name for the requested locale, shown in the fallback notice.
FallbackDefaultDisplayNamestring? (optional)- Display name for the locale actually served, shown in the fallback notice.
Pennington.DocSite.Services.ResolvedContent
namespace Pennington.DocSite.Services;
/// Rendered content plus the surrounding locale/fallback metadata needed to render a page.
public record ResolvedContent
{
/// Rendered content plus the surrounding locale/fallback metadata needed to render a page.
public record ResolvedContent(
ContentRoute Route,
string Title,
string? Description,
string Html,
OutlineEntry[] Outline,
IFrontMatter Metadata,
string Locale = "",
bool IsFallback = false,
string? RequestedLocale = null,
string? FallbackRequestedDisplayName = null,
string? FallbackDefaultDisplayName = null
);
/// Page description from front matter.
string? Description
;
/// Display name for the locale actually served, shown in the fallback notice.
string? FallbackDefaultDisplayName = null
;
/// Display name for the requested locale, shown in the fallback notice.
string? FallbackRequestedDisplayName = null
;
/// Rendered HTML body.
string Html
;
/// True when content from the default locale was served because the requested locale had no match.
bool IsFallback = false
;
/// Locale used to render the page (may differ from the requested locale when falling back).
string Locale = ""
/// Parsed front matter for the page.
IFrontMatter Metadata
;
/// Headings extracted from the body for the on-page outline.
OutlineEntry[] Outline
;
/// Locale the user originally requested, when different from Locale.
string? RequestedLocale = null
;
/// Canonical route for the resolved page.
ContentRoute Route
;
/// Page title from front matter.
string Title
;
}