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

github.com/dewittn/hugo-html5up-alpha.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNelson/Roberto <git@nelsonroberto.com>2022-02-16 00:23:58 +0300
committerNelson/Roberto <git@nelsonroberto.com>2022-02-16 00:23:58 +0300
commit5571b717feba3a765c5cae03ba04cb3b94e2b339 (patch)
treeab4f684926cfdaffaa023eb7e72434c9cc8ca1ee
parentc4dafe487f28e38fe1790c6561b45fe1d651c4d1 (diff)
Updated and organized <head> files
-rw-r--r--layouts/_default/baseof.html6
-rw-r--r--layouts/index.html7
-rw-r--r--layouts/partials/head/css.html (renamed from layouts/partials/head.html)3
-rw-r--r--layouts/partials/head/metadata.html16
-rw-r--r--layouts/partials/head/rss.html4
5 files changed, 30 insertions, 6 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index b035536..53b6bdc 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,7 +1,11 @@
<!DOCTYPE html>
<html>
<head>
- {{- partial "head.html" . -}}
+ {{- partial "head/metadata.html" . -}}
+ {{- partial "head/css.html" . -}}
+ {{- partial "head/rss.html" . -}}
+ {{- template "_internal/opengraph.html" . -}}
+ {{- template "_internal/twitter_cards.html" . -}}
</head>
<body class="is-preload">
<div id="page-wrapper">
diff --git a/layouts/index.html b/layouts/index.html
index 5cdd6a9..ec24a3c 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,8 +1,11 @@
<!DOCTYPE html>
<html>
<head>
- {{- partial "head.html" . -}}
- {{ template "_internal/opengraph.html" . }}
+ {{- partial "head/metadata.html" . -}}
+ {{- partial "head/css.html" . -}}
+ {{- partial "head/rss.html" . -}}
+ {{- template "_internal/opengraph.html" . -}}
+ {{- template "_internal/twitter_cards.html" . -}}
</head>
<body class="landing is-preload">
<div id="page-wrapper">
diff --git a/layouts/partials/head.html b/layouts/partials/head/css.html
index ffc500b..c85e6a1 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head/css.html
@@ -2,7 +2,4 @@
{{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "main.scss" . | resources.ToCSS $options }}
{{/* Uncomment to use main.css */}}
{{/* $style := resources.Get "sass/main.css" */}}
-<title>{{ if .IsHome }}{{ .Site.Params.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }}</title>
-<meta charset="utf-8" />
-<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="{{ $style.RelPermalink }}" /> \ No newline at end of file
diff --git a/layouts/partials/head/metadata.html b/layouts/partials/head/metadata.html
new file mode 100644
index 0000000..655e602
--- /dev/null
+++ b/layouts/partials/head/metadata.html
@@ -0,0 +1,16 @@
+<title>{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}</title>
+<meta charset="utf-8" />
+<meta name="description" content="{{ if .Description }}{{ .Description }}{{else}}{{ .Site.Params.Description}}{{end}}" />
+<meta name="keywords" content="{{ if .Keywords }}{{ .Keywords }}{{else}}{{ .Site.Params.Keywords}}{{end}}">
+<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
+{{ range .Site.Params.themeColor }}
+ <meta
+ name="theme-color"
+ content="{{ .content }}"
+ {{ if .customMedia }}
+ media="{{ .customMedia }}"
+ {{ else }}
+ {{ with .schema }} media="(prefers-color-scheme: {{ . }})" {{ end }}
+ {{ end }}
+ />
+{{ end }} \ No newline at end of file
diff --git a/layouts/partials/head/rss.html b/layouts/partials/head/rss.html
new file mode 100644
index 0000000..887c85f
--- /dev/null
+++ b/layouts/partials/head/rss.html
@@ -0,0 +1,4 @@
+<!-- RSS Feed -->
+{{ with .OutputFormats.Get "rss" -}}
+ {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
+{{ end -}} \ No newline at end of file