Skip to content

Commit

Permalink
Set proper publish date on episodes
Browse files Browse the repository at this point in the history
Fixes #31
  • Loading branch information
mattstratton committed Oct 6, 2016
1 parent b127571 commit e748d99
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions archetypes/episode.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 9 additions & 1 deletion layouts/partials/head/seo/open_graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}" />
Expand Down

0 comments on commit e748d99

Please sign in to comment.