Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (48 sloc) 2.45 KB
{{ "<!-- ENTERING partial seo-og.html (open graph) -->" | safeHTML }}
{{ $baseurl := .Site.BaseURL }}
{{ if .IsPage }}
<!-- Required Open Graph Info -->
<meta property="og:title" content="{{ .Title }}{{ if ne .Title .Site.Title }} : {{ .Site.Title }}{{ end }}" />
{{ with .Params.images }}{{ range first 6 . }}<meta property="og:image" content="{{ if in . "http" }}{{ . }}{{ else }}{{ $baseurl }}{{ . }}{{ end }}" />
{{ end }}
{{ end }}
<meta property="og:url" content="{{ .Permalink }}" />
<!-- Optional Open Graph Info -->
<meta property="og:description" content="{{ if .Description }}{{ .Description }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ end }}{{ end }}" />
<meta property="og:locale" content="{{ if .Params.locale }}{{ .Params.locale }}{{ else }}en_US{{ end }}" />
{{ with .Params.audio }}<meta property="og:audio" content="{{ . }}" />{{ end }}
{{ with .Params.videos }}{{ range . }}
<meta property="og:video" content="{{ . }}" />
{{ end }}
{{ end }}
{{ with .Site.Params.title }}<meta property="og:site_name" content="{{ . }}" />{{ end }}
{{ if eq .Type "post" }}
<!-- Required Open Graph Info -->
<meta property="og:type" content="article" />
<!-- ARTICLE Open Graph Info -->
<meta property="article:published_time" content="{{ .PublishDate.Format $.Site.Params.ISO8601 }}"/>
<meta property="article:modified_time" content="{{ .Date.Format $.Site.Params.ISO8601 }}"/>
<meta property="article:author" content="https://www.facebook.com/rickcogley" />
<meta property="article:publisher" content="https://www.facebook.com/rickcogley" />
<meta property="article:section" content="{{ .Section }}" />
{{ with .Params.tags }}{{ range first 6 . }}<meta property="article:tag" content="{{ . }}" />
{{ end }}
{{ end }}
<!-- If it is part of a series, link to related articles -->
{{ $permalink := .Permalink }}
{{ $siteSeries := .Site.Taxonomies.series }}
{{ with .Params.series }}{{ range $name := . }}
{{ $series := index $siteSeries $name }}
{{ range $page := first 6 $series.Pages }}
{{ if ne $page.Permalink $permalink }}<meta property="og:see_also" content="{{ $page.Permalink }}" />{{ end }}
{{ end }}
{{ end }}{{ end }}
{{ else if eq .Type "aboutpage" }}
<!-- PROFILE Open Graph Info -->
<meta property="profile:first_name" content="Rick" />
<meta property="profile:last_name" content="Cogley" />
<meta property="profile:username" content="rickcogley" />
<meta property="profile:gender" content="male" />
{{ end }}
{{ end }}
{{ "<!-- LEAVING partial seo-og.html -->" | safeHTML }}