Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/orf/bare-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Forbes <tom@tomforb.es>2020-08-23 18:20:23 +0300
committerGitHub <noreply@github.com>2020-08-23 18:20:23 +0300
commitd7d803fc813e00f7cfe47a3fff2959fca773f2ce (patch)
tree677639428ad803c8d30e1f4b84351b1180fe2dc8
parentd524b08a1c8b1a0fa7c06bbacb230c9fb362f85a (diff)
parent2fc4610d4836b3c414c720327a6ad5e653f035fe (diff)
Merge pull request #101 from eine/merge-head
layouts: merge 'head' and 'meta' partials into baseof
-rw-r--r--layouts/_default/baseof.html58
-rw-r--r--layouts/partials/head.html24
-rw-r--r--layouts/partials/meta.html9
3 files changed, 45 insertions, 46 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 189417b..a325fac 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,18 +1,50 @@
<!DOCTYPE html>
<html lang="en">
-{{- partial "head.html" . -}}
+{{ $options := (dict "outputStyle" "compressed") }}
+{{ $sass := resources.Get "css/site.sass" }}
+{{ if $.Site.Params.postcss }}
+{{ .Scratch.Set "sass" ($sass | resources.ToCSS $options | postCSS | resources.Minify | resources.Fingerprint "sha512") }}
+{{ else }}
+{{ .Scratch.Set "sass" ($sass | resources.ToCSS $options | resources.Minify | resources.Fingerprint "sha512") }}
+{{ end }}
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>
+ {{ if (eq .Page.Kind "taxonomy") }}
+ Posts tagged with
+ {{ end }}
+ {{ .Title }}
+ {{ if (and $.Site.Params.includeAuthorInTitle (in (slice "page" "taxonomy") .Page.Kind)) }} | {{ $.Site.Params.author }} {{ end }}
+ </title>
+ <link rel="stylesheet" href='{{ (.Scratch.Get "sass").Permalink }}' integrity='{{ (.Scratch.Get "sass").Data.Integrity }}'>
+ <link rel="canonical" href="{{ .Permalink }}">
+ {{ with $.Site.Home.OutputFormats.Get "rss" -}}
+ <link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink }}" title="{{ $.Site.Title }}">
+ {{ end -}}
+
+ <meta http-equiv="X-UA-Compatible" content="chrome=1">
+ <meta name="HandheldFriendly" content="True">
+ <meta name="MobileOptimized" content="320">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="referrer" content="no-referrer">
+ {{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
+ <meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
+
+ {{ template "_internal/opengraph.html" . }}
+</head>
<body>
-{{- partial "header.html" . -}}
-<section class="hero is-small is-info is-fullwidth">
- <div class="hero-body">
- {{- block "hero-body" . }}{{- end }}
- </div>
-</section>
-<section class="section">
- <div class="container">
- {{- block "main" . }}{{- end }}
- </div>
-</section>
-{{- partial "footer.html" . -}}
+ {{- partial "header.html" . -}}
+ <section class="hero is-small is-info is-fullwidth">
+ <div class="hero-body">
+ {{- block "hero-body" . }}{{- end }}
+ </div>
+ </section>
+ <section class="section">
+ <div class="container">
+ {{- block "main" . }}{{- end }}
+ </div>
+ </section>
+ {{- partial "footer.html" . -}}
</body>
</html>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
deleted file mode 100644
index abd7678..0000000
--- a/layouts/partials/head.html
+++ /dev/null
@@ -1,24 +0,0 @@
-{{ $options := (dict "outputStyle" "compressed") }}
-{{ $sass := resources.Get "css/site.sass" }}
-{{ if $.Site.Params.postcss }}
-{{ .Scratch.Set "sass" ($sass | resources.ToCSS $options | postCSS | resources.Minify | resources.Fingerprint "sha512") }}
-{{ else }}
-{{ .Scratch.Set "sass" ($sass | resources.ToCSS $options | resources.Minify | resources.Fingerprint "sha512") }}
-{{ end }}
-<head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>
- {{ if (eq .Page.Kind "taxonomy") }}
- Posts tagged with
- {{ end }}
- {{ .Title }}
- {{ if (and $.Site.Params.includeAuthorInTitle (in (slice "page" "taxonomy") .Page.Kind)) }} | {{ $.Site.Params.author }} {{ end }}
- </title>
- <link rel="stylesheet" href='{{ (.Scratch.Get "sass").Permalink }}' integrity='{{ (.Scratch.Get "sass").Data.Integrity }}'>
- <link rel="canonical" href="{{ .Permalink }}">
- {{ with $.Site.Home.OutputFormats.Get "rss" -}}
- <link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink }}" title="{{ $.Site.Title }}">
- {{ end -}}
- {{ partial "meta.html" . }}
-</head>
diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html
deleted file mode 100644
index 2d31807..0000000
--- a/layouts/partials/meta.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<meta http-equiv="X-UA-Compatible" content="chrome=1">
-<meta name="HandheldFriendly" content="True">
-<meta name="MobileOptimized" content="320">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<meta name="referrer" content="no-referrer">
-{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
-<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
-
-{{ template "_internal/opengraph.html" . }}