mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2025-10-09 10:11:14 +00:00
Update to Hugo v0.143.1
This commit is contained in:
parent
615e03bca3
commit
525b28e98b
13 changed files with 36 additions and 49 deletions
30
layouts/partials/external/twitter_cards.html
vendored
30
layouts/partials/external/twitter_cards.html
vendored
|
@ -1,30 +0,0 @@
|
|||
<!-- https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/twitter_cards.html -->
|
||||
{{- with $.Params.images -}}
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="{{ index . 0 | absURL }}">
|
||||
{{ else -}}
|
||||
{{- $images := $.Resources.ByType "image" -}}
|
||||
{{- $featured := $images.GetMatch "*feature*" -}}
|
||||
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
||||
{{- with $featured -}}
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="{{ $featured.Permalink }}">
|
||||
{{- else -}}
|
||||
{{- with $.Site.Params.images -}}
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="{{ index . 0 | absURL }}">
|
||||
{{ else -}}
|
||||
<meta name="twitter:card" content="summary">
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
<meta name="twitter:title" content="{{ .Title }}">
|
||||
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}">
|
||||
{{ with .Site.Social.twitter -}}
|
||||
<meta name="twitter:site" content="@{{ . }}">
|
||||
{{ end -}}
|
||||
{{ range .Site.Authors }}
|
||||
{{ with .twitter -}}
|
||||
<meta name="twitter:creator" content="@{{ . }}">
|
||||
{{ end -}}
|
||||
{{ end -}}
|
|
@ -57,7 +57,6 @@
|
|||
{{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}}
|
||||
{{- template "_internal/opengraph.html" . -}}
|
||||
{{- template "_internal/schema.html" . -}}
|
||||
{{- partial "external/twitter_cards.html" . -}}
|
||||
|
||||
{{ partial "citation.html" . }}
|
||||
|
||||
|
|
|
@ -62,7 +62,6 @@
|
|||
{{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}}
|
||||
{{- template "_internal/opengraph.html" . -}}
|
||||
{{- template "_internal/schema.html" . -}}
|
||||
{{- partial "external/twitter_cards.html" . -}}
|
||||
|
||||
{{ partial "citation.html" . }}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue