portfoligor/layouts/partials/metadata.html

36 lines
1.5 KiB
HTML
Raw Normal View History

<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/">
<link rel="schema.DCTERMS" href="http://purl.org/dc/terms/">
<meta property="og:site_name" content="{{ .Site.Title }}">
<meta property="og:url" content="{{ .Permalink }}">
<meta name="DC.creator" content="{{ .Site.Author.name }}">
<meta name="DC.language" content="{{ .Language.Lang }}">
{{ if .IsNode }}
<meta name="DC.title" content="{{ .Site.Title }}">
{{ end }}
{{ if .IsPage }}
<meta name="DC.type" content="blogPost">
<meta name="DC.title" content="{{ .Page.Title }}">
<meta name="DC.created"
content="{{ dateFormat "2006-01-02" (default .Date (.PublishDate)) }}">
<meta name="DC.date"
content="{{ dateFormat "2006-01-02" (default .Date (.PublishDate)) }}">
{{ if (and (isset .Params "lastmod") (gt (dateFormat "2016-01-02" (.Lastmod)) (dateFormat "2006-01-02" (.PublishDate)))) }}
<meta name="DC.modified" content="{{ .Lastmod }}">
{{ end }}
<meta name="og:article:published_time"
content="{{ dateFormat "2006-01-02" (default .Date (.PublishDate)) }}">
{{ if (and (isset .Params "lastmod") (gt (dateFormat "2016-01-02" (.Lastmod)) (dateFormat "2006-01-02" (.PublishDate)))) }}
<meta name="og.article:modified_time" content="{{ .Lastmod }}">
{{ end }}
{{ with .Params.categories }}
{{ range . }}
<meta name="DC.subject" content="{{ . }}">
{{ end }}
{{ end }}
{{ with .Params.tags }}
{{ range . }}
<meta name="DC.subject" content="{{ . }}">
{{ end }}
{{ end }}
{{ end }}