From 0b9acaf9eb8ba65595fe2762abfa79b0cd636acf Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Fri, 21 May 2021 18:59:15 +0100 Subject: Add defer attribute to js links --- www/posts/jigsaw/2020-06-01/scheduling-posts-in-jigsaw/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'www/posts/jigsaw/2020-06-01/scheduling-posts-in-jigsaw') diff --git a/www/posts/jigsaw/2020-06-01/scheduling-posts-in-jigsaw/index.html b/www/posts/jigsaw/2020-06-01/scheduling-posts-in-jigsaw/index.html index 9438359..292ee9f 100644 --- a/www/posts/jigsaw/2020-06-01/scheduling-posts-in-jigsaw/index.html +++ b/www/posts/jigsaw/2020-06-01/scheduling-posts-in-jigsaw/index.html @@ -36,7 +36,7 @@ return [ ], ], ];

When deploying the site each post is passed to this filter. The first thing it does is convert the date that has been specified in the post's YAML front matter into a Carbon instance. It then returns true if the date is on or before the current date, I.e. when the site is been deployed.

With this filter I can specify future dates for several posts and they will only published once that date comes around. Posts are also exluded if a date has not been specified. This allows me to have posts that are a work in progress and shouldn't be published.

Links

Jigsaw - Static Site Generator for PHP Developers.Using Filters in Jigsaw.Carbon - PHP API Extension for DateTime.Jigsaw - Read More Posts.

I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.

Email david@davidtsadler.com

License

The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Copyright © 2021 David T. Sadler.

Return to Homepage. - - + + -- cgit v1.2.3-13-gbd6f