head.html (2373B)
1 <meta http-equiv="content-type" content="text/html; charset=utf-8"> 2 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 3 <meta name="description" content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else if .Description}}{{ .Description | plainify }}{{ else }}{{ .Summary | plainify }}{{ end }}" /> 4 <meta name="keywords" content="{{ with .Params.Keywords }}{{ delimit . ", " }}{{ else }}{{ $.Site.Params.Keywords }}{{ end }}" /> 5 <meta name="robots" content="noodp" /> 6 <link rel="canonical" href="{{ .Permalink }}" /> 7 8 <!-- Custom CSS styles --> 9 {{ $style := resources.Get "sass/style.scss" | resources.ToCSS | resources.Minify }} 10 <link type="text/css" rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}"> 11 12 <!-- OG data --> 13 <meta property="og:locale" content="{{ $.Site.Language.Lang }}" /> 14 <meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" /> 15 <meta property="og:title" content="{{ if .IsHome }}{{ $.Site.Title }}{{ else }}{{ .Title }}{{ end }}"> 16 <meta property="og:description" content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else if .Description}}{{ .Description | plainify }}{{ else }}{{ .Summary | plainify }}{{ end }}" /> 17 <meta property="og:url" content="{{ .Permalink }}" /> 18 <meta property="og:site_name" content="{{ $.Site.Title }}" /> 19 20 {{ if and (not .IsHome) (isset .Params "cover") }} 21 <meta property="og:image" content="{{ .Param "cover" | absURL }}"> 22 {{ else }} 23 {{ if isset $.Site.Params "favicon" }} 24 <meta property="og:image" content="{{ $.Site.Params.favicon | absURL }}"> 25 {{ else }} 26 <meta property="og:image" content="{{ printf "img/favicon/%s.png" $.Site.Params.ThemeColor | absURL }}"> 27 {{ end }} 28 {{ end }} 29 30 <meta property="og:image:width" content="2048"> 31 <meta property="og:image:height" content="1024"> 32 33 {{ range .Params.categories }} 34 <meta property="article:section" content="{{ . }}" /> 35 {{ end }} 36 37 {{ if isset .Params "date" }} 38 <meta property="article:published_time" content="{{ time .Date }}" /> 39 {{ end }} 40 41 <!-- RSS --> 42 {{ with .OutputFormats.Get "RSS" }} 43 <link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" /> 44 {{ end }} 45 46 <!-- JSON Feed --> 47 {{ with .OutputFormats.Get "json" }} 48 <link href="{{ .RelPermalink }}" rel="alternate" type="application/json" title="{{ $.Site.Title }}" /> 49 {{ end }}