aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/docs/date.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/docs/date.html')
-rw-r--r--layouts/partials/docs/date.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/layouts/partials/docs/date.html b/layouts/partials/docs/date.html
new file mode 100644
index 0000000..73d69a3
--- /dev/null
+++ b/layouts/partials/docs/date.html
@@ -0,0 +1,6 @@
+<!--
+ Returns formatted date.
+ Usage: partial "docs/date" (dict "Date" .Date "Format" .Site.Params.BookDateFormat)
+-->
+{{- $format := default "January 2, 2006" .Format -}}
+{{- return (.Date.Format $format) -}}