header.html 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <!DOCTYPE html>
  2. <html lang="{{ .Site.LanguageCode | default "en-us" }}">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <meta name="theme" content="hugo-academic">
  8. {{ .Hugo.Generator }}
  9. {{ with .Site.Params.name }}<meta name="author" content="{{ . }}">{{ end }}
  10. {{ with .Site.Params.role }}<meta name="description" content="{{ . }}">{{ end }}
  11. {{/* Default to enabling highlighting, but allow the user to override it in .Params or .Site.Params.
  12. Use $.Scratch to store "highlight_enabled", so that we can read it again in footer.html. */}}
  13. {{ $.Scratch.Set "highlight_enabled" true }}
  14. {{ if isset .Params "highlight" }}
  15. {{ $.Scratch.Set "highlight_enabled" .Params.highlight }}
  16. {{ else if isset .Site.Params "highlight" }}
  17. {{ $.Scratch.Set "highlight_enabled" .Site.Params.highlight }}
  18. {{ end }}
  19. {{ if $.Scratch.Get "highlight_enabled" }}
  20. {{ $v := .Site.Params.highlight_version | default "9.9.0" }}
  21. {{ with .Site.Params.highlight_style }}
  22. <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/{{ $v }}/styles/{{ . }}.min.css">
  23. {{ else }}
  24. <link rel="stylesheet" href="{{ "/css/highlight.min.css" | relURL }}">
  25. {{ end }}
  26. {{ end }}
  27. <link rel="stylesheet" href="{{ "/css/bootstrap.min.css" | relURL }}">
  28. <link rel="stylesheet" href="{{ "/css/font-awesome.min.css" | relURL }}">
  29. <link rel="stylesheet" href="{{ "/css/academicons.min.css" | relURL }}">
  30. <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato:400,700|Merriweather|Roboto+Mono">
  31. <link rel="stylesheet" href="{{ "/css/hugo-academic.css" | relURL }}">
  32. {{ range .Site.Params.custom_css }}
  33. <link rel="stylesheet" href="{{ "/css/" | relURL }}{{ . }}">
  34. {{ end }}
  35. <link rel="alternate" href="{{ .RSSLink | default .Site.RSSLink }}" type="application/rss+xml" title="{{ .Site.Title }}">
  36. <link rel="feed" href="{{ .RSSLink | default .Site.RSSLink }}" type="application/rss+xml" title="{{ .Site.Title }}">
  37. <link rel="icon" type="image/png" href="{{ "/img/icon.png" | relURL }}">
  38. <link rel="apple-touch-icon" type="image/png" href="{{ "/img/apple-touch-icon.png" | relURL }}">
  39. <link rel="canonical" href="{{ .Permalink }}">
  40. {{ partial "head_custom" . }}
  41. <title>{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
  42. </head>
  43. <body id="top" data-spy="scroll" data-target="#navbar-main" data-offset="71">