Browse Source

update head

SyuanYu 2 years ago
parent
commit
333b3b4a68
1 changed files with 72 additions and 74 deletions
  1. 72 74
      layouts/partials/components/head.html

+ 72 - 74
layouts/partials/components/head.html

@@ -1,71 +1,54 @@
 <head>
-  <meta charset="utf-8">
-  <meta name="robots" content="all,follow">
-  <meta name="googlebot" content="index,follow,snippet,archive">
-  <meta name="viewport" content="width=device-width, initial-scale=1">
-  {{ $title_plain := .Title | markdownify | plainify }}
-  <title>{{ $title_plain }}</title>
-  <meta name="author" content="{{ .Param " author" }}" />
-  {{ $keywords := .Site.Params.defaultKeywords | default (slice "" | first 0) }}
-  {{ if isset .Params "tags" }}{{ range .Params.tags }}{{ $keywords = $keywords | append . }}{{ end }}{{ end }}
-  {{ if isset .Params "keywords" }}{{ range .Params.keywords }}{{ $keywords = $keywords | append . }}{{ end }}{{ end }}
-  {{ if gt (len $keywords) 0 }}
-  <meta name="keywords" content="{{ delimit (uniq $keywords) " , " }}">
-  {{ end }}
-  {{ $description_plain := default .Site.Params.defaultDescription .Description | markdownify | plainify }}
-  <meta name="description" content="{{ $description_plain }}">
-
-  {{ hugo.Generator }}
-
-  <!-- Font -->
-  <link href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,500,700,800' rel='stylesheet'
-    type='text/css'>
-
-  <!-- Bootstrap and Font Awesome CSS -->
-  <link rel="stylesheet" href="//use.fontawesome.com/releases/v5.11.2/css/all.css">
-  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
+    <meta charset="utf-8">
+    <meta name="robots" content="all,follow">
+    <meta name="googlebot" content="index,follow,snippet,archive">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    {{ $title_plain := .Title | markdownify | plainify }}
+    <title>{{ $title_plain }}</title>
+    <meta name="author" content="{{ .Param "author" }}" />
+    {{ $keywords := .Site.Params.defaultKeywords | default (slice "" | first 0) }}
+    {{ if isset .Params "tags" }}{{ range .Params.tags }}{{ $keywords = $keywords | append . }}{{ end }}{{ end }}
+    {{ if isset .Params "keywords" }}{{ range .Params.keywords }}{{ $keywords = $keywords | append . }}{{ end }}{{ end }}
+    {{ if gt (len $keywords) 0 }}
+    <meta name="keywords" content="{{ delimit (uniq $keywords) ", " }}">
+    {{ end }}
+    {{ $description_plain := default .Site.Params.defaultDescription .Description | markdownify | plainify }}
+    <meta name="description" content="{{ $description_plain }}">
+  
+    {{ hugo.Generator }}
+  
+    <!-- Font -->
+    <link href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,500,700,800' rel='stylesheet' type='text/css'>
+  
+    <!-- Bootstrap and Font Awesome CSS -->
+    <link rel="stylesheet" href="//use.fontawesome.com/releases/v5.11.2/css/all.css">
+    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" 
     integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
-
-  <!-- CSS animations  -->
-  <link href="{{ " css/animate.css" | relURL}}" rel="stylesheet">
-
-  <!-- Theme stylesheet, if possible do not edit this stylesheet -->
-  <!-- {{ with .Site.Params.style }}
+  
+    <!-- CSS animations  -->
+    <link href="{{ "css/animate.css" | relURL}}" rel="stylesheet">
+  
+    <!-- Theme stylesheet, if possible do not edit this stylesheet -->
+    <!-- {{ with .Site.Params.style }}
       <link href="{{ "css/style" | relURL}}.{{ . }}.css" rel="stylesheet" id="theme-stylesheet">
     {{ else }}
       <link href="{{ "css/style.default.css" | relURL}}" rel="stylesheet" id="theme-stylesheet">
     {{ end }} -->
-
-  <!-- Custom stylesheet - for your changes -->
-  <link href="{{ " css/custom.css" | relURL}}" rel="stylesheet">
-  <link href="{{ " css/customnft.css" | relURL}}" rel="stylesheet">
-  <link href="{{ " css/style.css" | relURL}}" rel="stylesheet">
-
-  <!-- Responsivity for older IE -->
-  {{ `
-  <!--[if lt IE 9]>
+  
+    <!-- Custom stylesheet - for your changes -->
+    <link href="{{ "css/custom.css" | relURL}}" rel="stylesheet">
+    <link href="{{ "css/customnft.css" | relURL}}" rel="stylesheet">
+    <link href="{{ "css/style.css" | relURL}}" rel="stylesheet">
+  
+    <!-- Responsivity for older IE -->
+    {{ `
+      <!--[if lt IE 9]>
           <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
           <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
       <![endif]-->
-  ` | safeHTML }}
-
-
-  <!-- Favicon and Apple touch icons-->
-  <link rel="shortcut icon" href="{{ " img/favicon.ico" | relURL }}" type="image/x-icon" />
-  <link rel="apple-touch-icon" href="{{ " img/apple-touch-icon.png" | relURL }}" />
-
-  <!-- swiper -->
-  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.css" />
-
-  <!-- owl carousel CSS -->
-  <link href="{{ " css/owl.carousel.css" | relURL}}" rel="stylesheet">
-  <link href="{{ " css/owl.theme.css" | relURL}}" rel="stylesheet">
-  <link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css" />
-
-  <!-- RSS feed -->
-  <link rel="alternate" href="{{ " /index.xml" | absURL }}" type="application/rss+xml" title="{{ .Site.Title }}">
-
-  <!-- Facebook OpenGraph tags -->
+    ` | safeHTML }}
+  
+        <!-- Facebook OpenGraph tags -->
   {{ $is_blog := and (eq .Type "blog") (eq .Kind "page") }}
   {{ $has_image := isset .Params "banner" }}
   {{ $image := cond $has_image .Params.banner (.Site.Params.default_sharing_image | default "img/sharing-default.png")
@@ -124,18 +107,33 @@
   <meta name="twitter:creator" content="@{{ . }}">{{ end }}
 
   <meta name="facebook-domain-verification" content="3xipgs46lfxeohb6sq2xw3ulmq94ew" />
-
-  <!-- Global site tag (gtag.js) - Google Ads: 474336061 -->
-  <script async src="https://www.googletagmanager.com/gtag/js?id=AW-474336061"></script>
-  <script>
-    window.dataLayer = window.dataLayer || [];
-    function gtag() { dataLayer.push(arguments); }
-    gtag('js', new Date());
-
-    gtag('config', 'AW-474336061');
-  </script>
-  <!-- Event snippet for ChoozMo video marking conversion page -->
-  <script>
-    gtag('event', 'conversion', { 'send_to': 'AW-474336061/nOm7CPHvtZ0DEL2Wl-IB' });
-  </script>
-</head>
+  
+    <!-- Favicon and Apple touch icons-->
+    <link rel="shortcut icon" href="{{ "img/favicon.ico" | relURL }}" type="image/x-icon" />
+    <link rel="apple-touch-icon" href="{{ "img/apple-touch-icon.png" | relURL }}" />
+  
+    <!-- swiper -->
+    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.css" />
+      
+    <!-- owl carousel CSS -->
+    <link href="{{ "css/owl.carousel.css" | relURL}}" rel="stylesheet">
+    <link href="{{ "css/owl.theme.css" | relURL}}" rel="stylesheet">
+    <link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css"/>
+  
+    <!-- RSS feed -->
+    <link rel="alternate" href="{{ "/index.xml" | absURL }}" type="application/rss+xml" title="{{ .Site.Title }}">
+  
+    <!-- Global site tag (gtag.js) - Google Ads: 474336061 -->
+    <script async src="https://www.googletagmanager.com/gtag/js?id=AW-474336061"></script>
+    <script>
+      window.dataLayer = window.dataLayer || [];
+      function gtag(){dataLayer.push(arguments);}
+      gtag('js', new Date());
+  
+      gtag('config', 'AW-474336061');
+    </script>
+    <!-- Event snippet for ChoozMo video marking conversion page -->
+    <script>
+      gtag('event', 'conversion', {'send_to': 'AW-474336061/nOm7CPHvtZ0DEL2Wl-IB'});
+    </script>
+  </head>