mirror of
https://github.com/msfjarvis/msfjarvis.dev.git
synced 2024-06-03 04:18:56 +05:30
Harsh Shandilya
3bea0a7ab3
* 'main' of github.com:msfjarvis/hugo-social-metadata: layouts: use direct permalink
41 lines
1.8 KiB
HTML
41 lines
1.8 KiB
HTML
<!-- Configure meta and title tags -->
|
|
<meta property="og:type" content="website" />
|
|
{{ if .Site.Params.TwitterCardType }}
|
|
<meta name="twitter:card" content="{{ .Site.Params.TwitterCardType }}" key="twcard" />
|
|
{{ else }}
|
|
<meta name="twitter:card" content="summary_large_image" key="twcard" />
|
|
{{ end }}
|
|
{{ if .Site.Params.TwitterUsername }}
|
|
<meta name="twitter:site" content="{{ .Site.Params.TwitterUsername }}" key="twhandle" />
|
|
{{ end }}
|
|
{{ if .IsHome }}
|
|
<title>{{ .Site.Title }}</title>
|
|
<meta name="description" content="{{ $.Site.Params.description }}" />
|
|
<meta name="keywords" content="{{ $.Site.Params.Keywords }}" />
|
|
<meta property="og:url" content="{{ .Site.BaseURL }}" key="ogurl" />
|
|
<meta property="og:title" content="{{ .Site.Title }}" key="ogtitle" />
|
|
<meta name="og:description" content="{{ $.Site.Params.description }}" key="ogdesc" />
|
|
{{ else }}
|
|
<title>{{ .Title }} · {{ .Site.Title }}</title>
|
|
<meta name="description" content="{{ .Description }}" />
|
|
{{ if .Params.tags }}
|
|
<meta name="keywords" content="{{ range .Params.tags }}{{ . }},{{ end }}" />
|
|
{{ else }}
|
|
<meta name="keywords" content="{{ $.Site.Params.Keywords }}" />
|
|
{{ end }}
|
|
<meta property="og:url" content="{{ .Permalink }}" />
|
|
<meta property="og:title" content="{{ .Title }} · {{ .Site.Title }}" />
|
|
{{ if .Description }}
|
|
<meta name="og:description" content="{{ .Description }}" />
|
|
{{ else }}
|
|
<meta name="og:description" content="{{ $.Site.Params.description }}" />
|
|
{{ end }}
|
|
<meta name="twitter:url" content="{{ .Permalink }}" />
|
|
{{ if .Params.SocialImage }}
|
|
<meta property="og:image" content="{{ .Site.BaseURL }}{{ .Params.SocialImage }}" key="ogimage" />
|
|
{{ else }}
|
|
<meta property="og:image" content="{{ .Site.BaseURL}}{{ .Site.Params.SocialImage }}" key="ogimage" />
|
|
{{ end }}
|
|
<link rel="canonical" href="{{ .Permalink }}" />
|
|
{{ end }}
|