78 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			78 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html>
 | |
| <html lang="{{ .Site.LanguageCode | default "en" }}">
 | |
|   <head>
 | |
|     <meta charset="utf-8" />
 | |
|     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 | |
|     
 | |
|     {{/* Generate consistent title */}}
 | |
|     {{ $title := "" }}
 | |
|     {{ if if .IsHome }}
 | |
|       {{ $title = .Title }}
 | |
|     {{ else }}
 | |
|       {{ $title = printf "%s - %s" .Title .Site.Title }}
 | |
|     {{ end }}
 | |
|     
 | |
|     <!-- Basic SEO -->
 | |
|     <title>{{ $title }}</title>
 | |
|     
 | |
|     {{/* Generate description from summary, description, or default site description */}}
 | |
|     {{ $description := "" }}
 | |
|     {{ with .Description }}
 | |
|       {{ $description = . }}
 | |
|     {{ else }}
 | |
|       {{ $description = .Site.Params.description }}
 | |
|     {{ end }}
 | |
|     <meta name="description" content="{{ $description }}" />
 | |
|     
 | |
|     {{/* Generate keywords from topics */}}
 | |
|     {{ with .Params.topics }}
 | |
|     <meta name="keywords" content="{{ delimit . ", " }}" />
 | |
|     {{ end }}
 | |
|     
 | |
|     <!-- Open Graph / Facebook -->
 | |
|     <meta property="og:site_name" content="{{ .Site.Title }}" />
 | |
|     <meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
 | |
|     <meta property="og:url" content="{{ .Permalink }}" />
 | |
|     <meta property="og:title" content="{{ $title }}" />
 | |
|     <meta property="og:description" content="{{ $description }}" />
 | |
|     {{ with .Params.ogImage | default .Site.Params.openGraphImage }}
 | |
|     <meta property="og:image" content="{{ . | absURL }}" />
 | |
|     {{ end }}
 | |
|     
 | |
|     <!-- Twitter -->
 | |
|     <meta name="twitter:card" content="summary_large_image" />
 | |
|     <meta name="twitter:title" content="{{ $title }}" />
 | |
|     <meta name="twitter:description" content="{{ $description }}" />
 | |
|     {{ with .Params.ogImage | default .Site.Params.openGraphImage }}
 | |
|     <meta name="twitter:image" content="{{ . | absURL }}" />
 | |
|     {{ end }}
 | |
|     
 | |
|     <!-- Canonical URL -->
 | |
|     <link rel="canonical" href="{{ .Permalink }}" />
 | |
|     
 | |
|     <!-- CSS Styles -->
 | |
|     {{ $style := resources.Get "css/styles.css" }}
 | |
|     {{ if hugo.IsProduction }}
 | |
|       {{ $style = $style | minify | fingerprint }}
 | |
|       <link rel="stylesheet" href="{{ $style.RelPermalink }}" integrity="{{ $style.Data.Integrity }}" crossorigin="anonymous">
 | |
|     {{ else }}
 | |
|       <link rel="stylesheet" href="{{ $style.RelPermalink }}">
 | |
|     {{ end }}
 | |
|   </head>
 | |
|   <body class="">
 | |
|     {{ partial "header.html" . }}
 | |
| 
 | |
|     {{ block "main" . }}{{ end }}
 | |
|     
 | |
|     {{ partial "footer.html" . }}
 | |
|     
 | |
|     {{ $js := resources.Match "js/*.js" | resources.Concat "js/bundle.js" }}
 | |
|     {{ if hugo.IsProduction }}
 | |
|       {{ $js = $js | minify | fingerprint }}
 | |
|       <script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}" crossorigin="anonymous"></script>
 | |
|     {{ else }}
 | |
|       <script src="{{ $js.RelPermalink }}"></script>
 | |
|     {{ end }}
 | |
|   </body>
 | |
| </html>
 |