head.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <meta charset="utf-8">
  2. <meta name="robots" content="all,follow">
  3. <meta name="googlebot" content="index,follow,snippet,archive">
  4. <meta name="viewport" content="width=device-width, initial-scale=1">
  5. {{ $title_plain := .Title | markdownify | plainify }}
  6. <title>{{ $title_plain }}</title>
  7. <meta name="author" content="{{ .Param " author" }}" />
  8. {{ $keywords := .Site.Params.defaultKeywords | default (slice "" | first 0) }}
  9. {{ if isset .Params "tags" }}{{ range .Params.tags }}{{ $keywords = $keywords | append . }}{{ end }}{{ end }}
  10. {{ if isset .Params "keywords" }}{{ range .Params.keywords }}{{ $keywords = $keywords | append . }}{{ end }}{{ end }}
  11. {{ if gt (len $keywords) 0 }}
  12. <meta name="keywords" content="{{ delimit (uniq $keywords) " , " }}">
  13. {{ end }}
  14. {{ $description_plain := default .Site.Params.defaultDescription .Description | markdownify | plainify }}
  15. <meta name="description" content="{{ $description_plain }}">
  16. <link rel="icon" href="/img/logo/favicon.png">
  17. {{ hugo.Generator }}
  18. <!-- Bootstrap and Font Awesome CSS -->
  19. <link rel="stylesheet" href="//use.fontawesome.com/releases/v5.11.2/css/all.css">
  20. <!-- <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> -->
  21. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
  22. integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
  23. <!-- jQuery -->
  24. <script
  25. src="https://code.jquery.com/jquery-3.3.1.js"
  26. integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
  27. crossorigin="anonymous"></script>
  28. {{ with .Site.Params.style }}
  29. <link href="{{ "css/style" | relURL }}.{{ . }}.css" rel="stylesheet" id="theme-stylesheet">
  30. {{ else }}
  31. <link rel="stylesheet" href="../css/reset.css">
  32. <link href="{{ "css/style.css" | relURL }}" rel="stylesheet" id="theme-stylesheet">
  33. <!-- <link href="{{ "css/style.default.css" | relURL }}" rel="stylesheet" id="theme-stylesheet"> -->
  34. {{ end }}
  35. <!-- Google Font -->
  36. <link rel="preconnect" href="https://fonts.googleapis.com">
  37. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  38. <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;500&display=swap" rel="stylesheet">