aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exampleSite/config.yml9
-rw-r--r--layouts/issues/small.html6
2 files changed, 10 insertions, 5 deletions
diff --git a/exampleSite/config.yml b/exampleSite/config.yml
index 85665f6..967505f 100644
--- a/exampleSite/config.yml
+++ b/exampleSite/config.yml
@@ -124,7 +124,7 @@ params:
- name: North Coast
description: The main servers are located here.
closed: true
- - name: East Coast
+ - name: East Coast
- name: Uncategorized
untitled: true
@@ -157,6 +157,11 @@ params:
dateFormat: January 2, 2006 at 3:04 PM
shortDateFormat: 15:04 — Jan 2
+ # If enabled, will display relative times for incident history and summaries instead of using dateFormat.
+ #
+ # Default: true
+ useRelativeTime: true
+
# What header design should we use?
#
# Default: true
@@ -277,7 +282,7 @@ params:
# Default: `true`
# BOOLEAN; `true`, `false`
alwaysKeepBrandColor: true
-
+
# Introduced in v4.0.1 for consistent
# site title text color.
#
diff --git a/layouts/issues/small.html b/layouts/issues/small.html
index 6112e46..79db524 100644
--- a/layouts/issues/small.html
+++ b/layouts/issues/small.html
@@ -8,7 +8,7 @@
<a href="{{ .Permalink }}" class="issue no-underline">
{{ if .Params.informational }}
- <small class="date float-right relative-time" title="{{ .Date.Format "02 Jan 2006 03:05:00 PM" }}">
+ <small class="date float-right {{ cond .Site.Params.useRelativeTime "relative-time" "" }}" title="{{ .Date.Format "02 Jan 2006 03:05:00 PM" }}">
{{ if .Site.Params.dateFormat }}
{{ .Date.Format .Site.Params.dateFormat }}
{{ else }}
@@ -23,7 +23,7 @@
</span>
{{ else if .Params.Resolved }}
- <small class="date float-right relative-time" title="{{ .Date.Format "02 Jan 2006 03:05:00 PM" }}">
+ <small class="date float-right {{ cond .Site.Params.useRelativeTime "relative-time" "" }}" title="{{ .Date.Format "02 Jan 2006 03:05:00 PM" }}">
{{ if .Site.Params.dateFormat }}
{{ .Date.Format .Site.Params.dateFormat }}
{{ else }}
@@ -67,7 +67,7 @@
{{ end }}
{{ else }}
- <small class="date float-right relative-time" title="{{ .Date.Format "02 Jan 2006 03:05:00 PM" }}">
+ <small class="date float-right {{ cond .Site.Params.useRelativeTime "relative-time" "" }}" title="{{ .Date.Format "02 Jan 2006 03:05:00 PM" }}">
{{ if .Site.Params.dateFormat }}
{{ .Date.Format .Site.Params.dateFormat }}
{{ else }}