mirror of https://github.com/lxndrblz/anatole.git

lxndrblz
18.08.2022 800b13d687b8df22e9050874366e5ce79e7b80bf
layouts/partials/head.html
@@ -3,20 +3,14 @@
    {{ if (eq .Site.Params.reversepagetitle true) }}
      {{ with .Title }}
        {{ . }} |
      {{ end }}
      {{- .Site.Params.author -}}
    {{ else }}
      {{- .Site.Params.author -}}{{ with .Title }}
        |
        {{ . }}
      {{ end }}
    {{ end }}
  </title>
@@ -30,21 +24,15 @@
    name="description"
    content="{{ if .Params.description }}
      {{- .Params.description -}}
    {{ else }}
      {{- .Site.Params.description -}}
    {{ end }}"
  />
  {{ if .Params.redirectUrl }}
    <meta http-equiv="refresh" content="1; url={{ .Params.redirectUrl }}" />
  {{ end }}
  {{- if .Site.Params.googleSiteVerify }}
    <meta name="google-site-verification" content="{{ .Site.Params.googleSiteVerify }}" />
  {{- end -}}
@@ -59,7 +47,6 @@
      crossorigin="anonymous"
      type="text/css"
    />
  {{ else }}
    {{ $sassTemplate := resources.Get "scss/anatole.scss" }}
    {{ $style := $sassTemplate | resources.ExecuteAsTemplate "scss/main.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint }}
@@ -70,7 +57,6 @@
      crossorigin="anonymous"
      type="text/css"
    />
  {{ end }}
  {{ $markupHighlightStyle := resources.Get "css/markupHighlight.css" | resources.Minify | resources.Fingerprint }}
@@ -91,7 +77,6 @@
      crossorigin="anonymous"
      media="screen"
    />
  {{ end }}
  {{ $style := resources.Get "fontawesome/css/fontawesome.min.css" | resources.Fingerprint }}
  <link
@@ -134,7 +119,6 @@
      crossorigin="anonymous"
      type="text/css"
    />
  {{- end -}}
  {{ if .Site.Params.googleFonts }}
    {{ $baseUrl := "https://fonts.googleapis.com/css2?family=" }}
@@ -143,7 +127,6 @@
    <link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    <link href="{{ $url }}" rel="stylesheet" />
  {{- end -}}
@@ -158,8 +141,6 @@
  <!-- RSS -->
  {{ with .OutputFormats.Get "rss" -}}
    {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
  {{ end -}}
@@ -182,34 +163,25 @@
      integrity="{{ $secureThemeSwitcherJS.Data.Integrity }}"
      crossorigin="anonymous"
    ></script>
  {{ end }}
  {{- $js := "" -}}
  {{- range .Site.Params.customJs -}}
    {{- if or (in . "http://") (in . "https://") -}}
      <script src="{{ . | relURL }}"></script>
    {{- else -}}
      {{- $customJS := resources.Get . -}}
      {{- if $customJS -}}
        {{- if eq $js "" -}}
          {{- $js = $customJS -}}
        {{- else -}}
          {{- $js = slice $js $customJS | resources.Concat "js/custom.js" -}}
        {{- end -}}
      {{- end -}}
    {{- end -}}
  {{- end -}}
  {{- if ne $js "" -}}
@@ -220,19 +192,14 @@
      integrity="{{ $secureJS.Data.Integrity }}"
      crossorigin="anonymous"
    ></script>
  {{- end -}}
  {{ if and hugo.IsProduction .Site.Params.plausibleAnalytics .Site.Params.plausibleAnalytics.domain }}
    {{- partial "analytics/plausible" . -}}
  {{ end }}
  {{ if and hugo.IsProduction .Site.Params.umami.serverURL .Site.Params.umami.id }}
    {{- partial "analytics/umami" . -}}
  {{ end }}