Statiq.Web icon indicating copy to clipboard operation
Statiq.Web copied to clipboard

Add a CurrentDate metadata field and use it instead of DateTime.Now/Today

Open daveaglick opened this issue 4 years ago • 0 comments

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

daveaglick avatar Jun 10 '20 17:06 daveaglick