Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mattstratton/castanet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Stratton <matt.stratton@gmail.com>2016-10-06 18:52:12 +0300
committerMatt Stratton <matt.stratton@gmail.com>2016-10-06 18:52:12 +0300
commite748d99ad955d36dc61e7b0c1fd00e64c7e3d74b (patch)
treeb71c29ee4b5f0d02424cd2d158e644b3b71be59c /layouts/partials
parentb127571c5ddf0f45fca9723ad2fa81988473fe2b (diff)
Set proper publish date on episodes
Fixes #31
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/head/seo/open_graph.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/layouts/partials/head/seo/open_graph.html b/layouts/partials/head/seo/open_graph.html
index 39d0b5a..a63eeac 100644
--- a/layouts/partials/head/seo/open_graph.html
+++ b/layouts/partials/head/seo/open_graph.html
@@ -37,7 +37,15 @@
{{ end }}
<meta property="article:publisher" content="https://www.facebook.com/{{ .Site.Params.social.facebook }}" />
{{if .IsPage}}
-<meta property="article:published_time" content="{{ .PublishDate }}" />
+ {{ if isset .Params "PublishDate" }}
+ {{ if ne .PublishDate "" }}
+ <meta property="article:published_time" content="{{ .PublishDate }}" />
+ {{ else }}
+ <meta property="article:published_time" content="{{ .Date }}" />
+ {{ end }}
+ {{ else }}
+ <meta property="article:published_time" content="{{ .Date }}" />
+ {{ end }}
{{ end }}
<meta property="article:modified_time" content="{{ .Date }}" />
<meta property="article:section" content="{{ .Section }}" />