From c09ee78fd235599d3fb794110cd75c024d80cfca Mon Sep 17 00:00:00 2001 From: Anthony Fok Date: Sun, 12 Aug 2018 12:25:41 -0600 Subject: [PATCH] tpl: Suppress blank lines from opengraph internal template --- tpl/tplimpl/embedded/templates.autogen.go | 63 ++++++++++--------- tpl/tplimpl/embedded/templates/opengraph.html | 63 ++++++++++--------- 2 files changed, 68 insertions(+), 58 deletions(-) diff --git a/tpl/tplimpl/embedded/templates.autogen.go b/tpl/tplimpl/embedded/templates.autogen.go index 0ecb4dad0..046882ed3 100644 --- a/tpl/tplimpl/embedded/templates.autogen.go +++ b/tpl/tplimpl/embedded/templates.autogen.go @@ -174,45 +174,50 @@ if (!doNotTrack) { -{{ with .Params.images }}{{ range first 6 . }} - +{{- with .Params.images }}{{ range first 6 . }} + {{ end }}{{ end }} -{{ if .IsPage }} -{{ if not .PublishDate.IsZero }} -{{ else if not .Date.IsZero }}{{ end }} -{{ if not .Lastmod.IsZero }}{{ end }} -{{ else }} -{{ if not .Date.IsZero }}{{ end }} -{{ end }}{{ with .Params.audio }} -{{ end }}{{ with .Params.locale }} -{{ end }}{{ with .Site.Params.title }} -{{ end }}{{ with .Params.videos }} -{{ range . }} - +{{- if .IsPage }} +{{- if not .PublishDate.IsZero }} +{{ else if not .Date.IsZero }} +{{ end }} +{{- if not .Lastmod.IsZero }}{{ end }} +{{- else }} +{{- if not .Date.IsZero }} + +{{- end }} +{{- end }}{{/* .IsPage */}} + +{{- with .Params.audio }}{{ end }} +{{- with .Params.locale }}{{ end }} +{{- with .Site.Params.title }}{{ end }} +{{- with .Params.videos }} +{{- range . }} + {{ end }}{{ end }} - -{{ $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 }}{{ 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 }}{{ end }} + {{- end }} {{ end }}{{ end }} -{{ if .IsPage }} -{{ range .Site.Authors }}{{ with .Social.facebook }} +{{- if .IsPage }} +{{- range .Site.Authors }}{{ with .Social.facebook }} {{ end }}{{ with .Site.Social.facebook }} {{ end }} -{{ with .Params.tags }}{{ range first 6 . }} - {{ end }}{{ end }} -{{ end }}{{ end }} +{{- with .Params.tags }}{{ range first 6 . }} +{{ end }}{{ end }} +{{- end }}{{ end }} - -{{ with .Site.Social.facebook_admin }}{{ end }}`}, +{{- /* Facebook Page Admin ID for Domain Insights */}} +{{- with .Site.Social.facebook_admin }}{{ end }}`}, {`pagination.html`, `{{ $pag := $.Paginator }} {{ if gt $pag.TotalPages 1 }}