Statiq.Web
Statiq.Web copied to clipboard
Add a CurrentDate metadata field and use it instead of DateTime.Now/Today
Right now DateTime.Today
is used to determine if a page/post has a future publish date (and therefore should be excluded). Instead of basing that on the current date, use a metadata key of CurrentDate
which defaults to DateTime.Today
but can be set to any date in the future to preview pending changes.
See https://github.com/statiqdev/Statiq.Web/blob/75c9620d334040aef64d6fed01587e8879e1e79e/src/Statiq.Web/BootstrapperExtensions.cs#L81