baseof.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <!DOCTYPE html>
  2. <html lang="{{ .Site.LanguageCode }}">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. {{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
  7. {{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
  8. {{ with .Site.Params.keywords }}<meta name="keywords" content="{{ . }}">{{ end }}
  9. <base href="{{ .Site.BaseURL }}">
  10. <title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
  11. <link rel="canonical" href="{{ .Permalink }}">
  12. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Mono:400,700">
  13. <link rel="stylesheet" href="//cdn.rawgit.com/necolas/normalize.css/master/normalize.css">
  14. {{ if .Site.IsServer }}
  15. {{ $cssOpts := (dict "targetPath" "css/coder.css" "enableSourceMap" true ) }}
  16. {{ $styles := resources.Get "scss/coder.scss" | resources.ExecuteAsTemplate "style.coder.css" . | toCSS $cssOpts }}
  17. <link rel="stylesheet" href="{{ $styles.Permalink }}" media="screen">
  18. {{ else }}
  19. {{ $cssOpts := (dict "targetPath" "css/coder.css" ) }}
  20. {{ $styles := resources.Get "scss/coder.scss" | resources.ExecuteAsTemplate "style.coder.css" . | toCSS $cssOpts | minify | fingerprint }}
  21. <link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen">
  22. {{ end }}
  23. {{ range .Site.Params.custom_css }}
  24. <link rel="stylesheet" href="{{ . | absURL }}">
  25. {{ end }}
  26. <link rel="icon" type="image/png" href="{{ "/images/favicon-32x32.png" | absURL }}" sizes="32x32">
  27. <link rel="icon" type="image/png" href="{{ "/images/favicon-16x16.png" | absURL }}" sizes="16x16">
  28. {{ if .RSSLink }}
  29. <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
  30. <link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
  31. {{ end }}
  32. {{ .Hugo.Generator }}
  33. </head>
  34. <body>
  35. <main class="wrapper">
  36. {{ partial "header.html" . }}
  37. <div class="content">
  38. {{ block "content" . }}{{ end }}
  39. </div>
  40. {{ partial "footer.html" . }}
  41. </main>
  42. {{ template "_internal/google_analytics.html" . }}
  43. </body>
  44. </html>