Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

article:published_time (used by Slack and other apps) is unix epoch #1185

Closed
kevinreedy opened this issue Sep 28, 2016 · 3 comments
Closed
Assignees
Labels

Comments

@kevinreedy
Copy link
Contributor

On https://www.devopsdays.org/events/2016-kansascity/program/kyle-sexton/, the meta information for published_time is the unix epoch (0001-01-01 00:00:00), which results in a bad date in apps that use this information.

<meta property="article:published_time" content="0001-01-01 00:00:00 &#43;0000 UTC"/>

slack_-_chef

I also spot checked another link - https://www.devopsdays.org/events/2016-detroit/program/containers-will-not-fix/

@mattstratton
Copy link
Member

Oh, snap.

We set that here:
https://github.com/devopsdays/devopsdays-web/blob/master/layouts/partials/head/seo/open_graph.html#L36

But the problem is that .PublishDate isn't set in the frontmatter of anything.

One possible fix would be to change that line to be content="{{ .Date }} instead.

The other fix is to add the PublishDate parameter to frontmatter of everything.

I think that we should actually add PublishDate, because it might be used other places we don't know about. Or better yet, here's what we do:

  1. Update the generators/archetypes to include PublishDate
  2. put in a conditional to use PublishDate in the meta if it exists, and if not, use Date

@mattstratton
Copy link
Member

Did a little bit of digging, and it seems that .PublishDate is generated off of Date, but it's not working for some reason.

Hugo support forums suggested that the problem is we have Date in quotes, which is odd because it comes from the generator.

@mattstratton
Copy link
Member

This will be fixed in devopsdays-theme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants