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

github.com/de-souza/hugo-flex.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/_default/baseof.html18
-rw-r--r--layouts/partials/meta.html17
2 files changed, 18 insertions, 17 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index b5279a0..5282f44 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,23 +1,7 @@
<!DOCTYPE html>
<html lang="{{ site.LanguageCode }}">
<head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- {{ with .Description }}
- <meta name="description" content="{{ . }}">
- {{ else }}
- {{ if .IsPage }}
- <meta name="description" content="{{ .Summary }}">
- {{ else }}
- {{ with .Site.Params.description }}
- <meta name="description" content="{{ . }}">
- {{ end }}
- {{ end }}
- {{ end }}
- {{ hugo.Generator }}
- {{ if site.Params.schema }}{{ template "_internal/schema.html" . }}{{ end }}
- {{ if site.Params.opengraph }}{{ template "_internal/opengraph.html" . }}{{ end }}
- {{ if site.Params.twittercards }}{{ template "_internal/twitter_cards.html" . }}{{ end }}
+ {{ partial "meta.html" . }}
<title>
{{ if eq .Title site.Title }}
{{ site.Title }}
diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html
new file mode 100644
index 0000000..696e244
--- /dev/null
+++ b/layouts/partials/meta.html
@@ -0,0 +1,17 @@
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+{{ with .Description }}
+<meta name="description" content="{{ . }}">
+{{ else }}
+{{ if .IsPage }}
+<meta name="description" content="{{ .Summary }}">
+{{ else }}
+{{ with .Site.Params.description }}
+<meta name="description" content="{{ . }}">
+{{ end }}
+{{ end }}
+{{ end }}
+{{ if site.Params.schema }}{{ template "_internal/schema.html" . }}{{ end }}
+{{ if site.Params.opengraph }}{{ template "_internal/opengraph.html" . }}{{ end }}
+{{ if site.Params.twittercards }}{{ template "_internal/twitter_cards.html" . }}{{ end }}
+{{ hugo.Generator }}