aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/docs/date.html
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2020-04-10 20:24:36 +0200
committerAlex Shpak <alex-shpak@users.noreply.github.com>2020-04-10 20:24:36 +0200
commit8927a3c672a6e7a40519626b7df31d7dace800a9 (patch)
treea67d6be6bf06c87f1abe50b29ca6b4580e0a96a8 /layouts/partials/docs/date.html
parent6234f1265497cdce9cbaa0ebf0c06137aed9fdca (diff)
#162, Add docs/date partial, for date customization
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) -}}