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

FrontMatterExtensions Pennington.FrontMatter

Helpers that combine IFrontMatter capability checks into the single "skip this page during build" decision every content service and feed builder asks.

Methods

IsHiddenFromBuild

#
public static bool IsHiddenFromBuild(IFrontMatter frontMatter, TimeProvider clock)

True when the page should be excluded from production build output — either explicitly drafted (IsDraft) or scheduled for a future Date. Mirrors the dev-vs-build split: dev-time requests still render so authors can preview, but the static crawler skips these routes.

Parameters

frontMatter IFrontMatter
clock TimeProvider

Returns

bool

IsScheduled

#
public static bool IsScheduled(IFrontMatter frontMatter, TimeProvider clock)

True when Date is set to a moment after clock's current wall-clock time. Comparison uses the wall-clock time in clock's configured local zone (without re-converting through the system zone), which is how YAML date: values — parsed as Unspecified — are meant to read.

Parameters

frontMatter IFrontMatter
clock TimeProvider

Returns

bool

Pennington.FrontMatter.FrontMatterExtensions

namespace Pennington.FrontMatter;

/// Helpers that combine IFrontMatter capability checks into the single "skip this page during build" decision every content service and feed builder asks.
public class FrontMatterExtensions
{
    /// True when the page should be excluded from production build output — either explicitly drafted (IsDraft) or scheduled for a future Date. Mirrors the dev-vs-build split: dev-time requests still render so authors can preview, but the static crawler skips these routes.
    
public static bool IsHiddenFromBuild(IFrontMatter frontMatter, TimeProvider clock)
; /// True when Date is set to a moment after clock's current wall-clock time. Comparison uses the wall-clock time in clock's configured local zone (without re-converting through the system zone), which is how YAML date: values — parsed as Unspecified — are meant to read.
public static bool IsScheduled(IFrontMatter frontMatter, TimeProvider clock)
; }