Skip to content

Commit b9055dc

Browse files
committed
Try adding twitter tags, site_name for large open-graph preview
1 parent 53d4393 commit b9055dc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

layouts/partials/head.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,38 @@
1010
{{ if .IsHome -}}
1111
<title>{{ .Site.Title | emojify }}</title>
1212
<meta name="title" content="{{ .Site.Title | emojify }}" />
13+
<meta name="og:site_name" content="stemformulas.com" />
1314
<meta property="og:title" content='stemformulas'/>
1415
<meta property="og:image" content='https://github.com/stemformulas/stemformulas.github.io/raw/main/equalsicon-wide.png'/>
1516
<meta property="og:description" content='All of the STEM formulas, eventually'/>
1617
<meta property="og:url" content='https://stemformulas.com'/>
1718
<meta property="og:image:width" content='800' />
1819
<meta property="og:image:height" content='1200' /><!-- TYPE BELOW IS PROBABLY: 'website' or 'article' or look on https://ogp.me/#types -->
1920
<meta property="og:type" content='website'/>
21+
<meta name="twitter:title" content="{{ .Site.Title | emojify }}"/>
22+
<meta name="twitter:description" content="All of the STEM formulas, eventually"/>
23+
<meta name="twitter:card" content="summary_large_image"/>
24+
<meta name="twitter:image:src" content="https://github.com/stemformulas/stemformulas.github.io/raw/main/equalsicon-wide.png"/>
25+
2026
{{- else -}}
2127
<title>{{ .Title | emojify }} &middot; {{ .Site.Title | emojify }}</title>
2228
<meta name="title" content="{{ .Title | emojify }} &middot; {{ .Site.Title | emojify }}" />
29+
<meta name="og:site_name" content="stemformulas.com" />
2330
<meta property="og:title" content="{{ .Title | emojify }} &middot; {{ .Site.Title | emojify }}" />
2431
<meta property="og:image" content="{{ printf "%s" "preview.png" | printf "%s%s" .RelPermalink | printf "%s%s" "https://github.com/stemformulas/stemformulas.github.io/raw/main/content" | printf "%s"
2532
| emojify }}" />
2633
<meta property="og:image:width" content='1500' />
2734
<meta property="og:image:height" content='1500' />
2835
<meta property="og:type" content='website'/>
36+
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
37+
<meta name="twitter:title" content="{{ .Title | emojify }} &middot; {{ .Site.Title | emojify }}" />
38+
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
39+
<meta name="twitter:card" content="summary_large_image"/>
40+
<meta name="twitter:image:src" content="{{ printf "%s" "preview.png" | printf "%s%s" .RelPermalink | printf "%s%s" "https://github.com/stemformulas/stemformulas.github.io/raw/main/content" | printf "%s"
41+
| emojify }}"/>
2942
{{- end }}
43+
<meta name="twitter:site" content="stemformulas.com">
44+
<meta name="theme-color" content="#000000">
3045
{{/* Metadata */}}
3146
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
3247
{{ with .Site.Params.keywords -}}

0 commit comments

Comments
 (0)