ResolvedContent
Pennington.DocSite.Services
Rendered content plus the surrounding locale/fallback metadata needed to render a page.
Properties
Descriptionstring- Page description from front matter.
FallbackDefaultDisplayNamestring- Display name for the locale actually served, shown in the fallback notice.
FallbackRequestedDisplayNamestring- Display name for the requested locale, shown in the fallback notice.
Htmlstring- Rendered HTML body.
IsFallbackbool- True when content from the default locale was served because the requested locale had no match.
Localestring- Locale used to render the page (may differ from the requested locale when falling back).
MetadataIFrontMatter- Parsed front matter for the page.
OutlineOutlineEntry[]- Headings extracted from the body for the on-page outline.
RequestedLocalestring- Locale the user originally requested, when different from
Locale. RouteContentRoute- Canonical route for the resolved page.
Titlestring- Page title from front matter.
Constructors
ResolvedContent
#public 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- Locale used to render the page (may differ from the requested locale when falling back).
IsFallbackbool- True when content from the default locale was served because the requested locale had no match.
RequestedLocalestring- Locale the user originally requested, when different from
Locale. FallbackRequestedDisplayNamestring- Display name for the requested locale, shown in the fallback notice.
FallbackDefaultDisplayNamestring- 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
{
/// Page description from front matter.
public string Description { get; set; }
/// Display name for the locale actually served, shown in the fallback notice.
public string FallbackDefaultDisplayName { get; set; }
/// Display name for the requested locale, shown in the fallback notice.
public string FallbackRequestedDisplayName { get; set; }
/// Rendered HTML body.
public string Html { get; set; }
/// True when content from the default locale was served because the requested locale had no match.
public bool IsFallback { get; set; }
/// Locale used to render the page (may differ from the requested locale when falling back).
public string Locale { get; set; }
/// Parsed front matter for the page.
public IFrontMatter Metadata { get; set; }
/// Headings extracted from the body for the on-page outline.
public OutlineEntry[] Outline { get; set; }
/// Locale the user originally requested, when different from Locale.
public string RequestedLocale { get; set; }
/// Rendered content plus the surrounding locale/fallback metadata needed to render a page.
public 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)
;
/// Canonical route for the resolved page.
public ContentRoute Route { get; set; }
/// Page title from front matter.
public string Title { get; set; }
}