From e748d99ad955d36dc61e7b0c1fd00e64c7e3d74b Mon Sep 17 00:00:00 2001 From: Matt Stratton Date: Thu, 6 Oct 2016 10:52:12 -0500 Subject: [PATCH] Set proper publish date on episodes Fixes #31 --- archetypes/episode.md | 1 + layouts/partials/head/seo/open_graph.html | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/archetypes/episode.md b/archetypes/episode.md index 8fadb223..f146a69f 100644 --- a/archetypes/episode.md +++ b/archetypes/episode.md @@ -1,5 +1,6 @@ +++ Description = "" +PublishDate = "" # this is the datetime for the when the epsiode was published. This will default to Date if it is not set. Example is "2016-04-25T04:09:45-05:00" podcast_file = "###.mp3" # the name of the podcast file, after the media prefix. podcast_duration = "" podcast_length = "" # the length of the episode in bytes diff --git a/layouts/partials/head/seo/open_graph.html b/layouts/partials/head/seo/open_graph.html index 39d0b5a1..a63eeacc 100644 --- a/layouts/partials/head/seo/open_graph.html +++ b/layouts/partials/head/seo/open_graph.html @@ -37,7 +37,15 @@ {{ end }} {{if .IsPage}} - + {{ if isset .Params "PublishDate" }} + {{ if ne .PublishDate "" }} + + {{ else }} + + {{ end }} + {{ else }} + + {{ end }} {{ end }}