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
frontMatterIFrontMatterclockTimeProvider
Returns
boolIsScheduled
#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
frontMatterIFrontMatterclockTimeProvider
Returns
boolPennington.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)
;
}