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

github.com/carsonip/hugo-theme-minos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarson Ip <carsonip@users.noreply.github.com>2017-05-15 14:35:03 +0300
committerGitHub <noreply@github.com>2017-05-15 14:35:03 +0300
commitaffb2a4b05795fe46a5bc2275954b7d48301588d (patch)
tree766b267834e0a95958073cc6c904d612c4baa389
parent00ce678fe3d36492df1f5613c0bcdc07c25fd1f0 (diff)
parentb3f976b16210d2f2fd654530583bd141cd239c07 (diff)
Merge pull request #8 from wlsc/master
MINOR: improvements to meta partial
-rw-r--r--layouts/partials/head.html13
-rw-r--r--layouts/partials/meta.html6
-rw-r--r--layouts/partials/og.html16
3 files changed, 16 insertions, 19 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 3c6378b..4e6529b 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,10 +1,9 @@
<!DOCTYPE html>
<html>
<head>
- <meta charset="utf-8">
<title>{{ .Title }}{{ if ne .Title .Site.Title }} // {{ .Site.Title }}{{ end }}</title>
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+ {{ partial "meta.html" . }}
{{ partial "og.html" . }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
@@ -16,14 +15,6 @@
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/style.css">
<link href="http://gmpg.org/xfn/11" rel="profile">
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
-
- <!-- Enable responsiveness on mobile devices-->
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
-
- <meta name="description" content="{{ .Description }}">
- <meta name="keywords" content="{{ range .Keywords }}{{ . }},{{ end }}">
- <meta name="author" content="{{ .Params.author }}">
-
+
{{ .Hugo.Generator }}
</head>
diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html
new file mode 100644
index 0000000..6a1975a
--- /dev/null
+++ b/layouts/partials/meta.html
@@ -0,0 +1,6 @@
+ <meta charset="utf-8">
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
+ <meta name="description" content="{{ .Site.Params.Description }}">
+ <meta name="keywords" content="{{ range .Site.Params.Keywords }}{{ . }},{{ end }}">
+ <meta name="author" content="{{ .Site.Params.Author }}"> \ No newline at end of file
diff --git a/layouts/partials/og.html b/layouts/partials/og.html
index 47ac989..077740a 100644
--- a/layouts/partials/og.html
+++ b/layouts/partials/og.html
@@ -1,8 +1,8 @@
-<meta property="og:title" content="{{ if .Params.ogtitle }}{{ .Params.ogtitle }}{{ else }}{{ .Title }}{{ end }}" />
-<meta property="og:description" content="{{ if .Params.ogdescription }}{{ .Params.ogdescription }}{{ else }}{{ .Description }}{{ end }}" />
-<meta property="og:type" content="website" />
-<meta property="og:locale" content="en_US" />
-<meta property="og:url" content="{{ .Permalink }}" />
-{{ if .Params.ogimage }}
-<meta property="og:image" content="{{ .Params.ogimage }}" />
-{{ end }} \ No newline at end of file
+ <meta property="og:title" content="{{ if .Params.ogtitle }}{{ .Params.ogtitle }}{{ else }}{{ .Title }}{{ end }}" />
+ <meta property="og:description" content="{{ if .Params.ogdescription }}{{ .Params.ogdescription }}{{ else }}{{ .Site.Params.Description }}{{ end }}" />
+ <meta property="og:type" content="website" />
+ <meta property="og:locale" content="en_US" />
+ <meta property="og:url" content="{{ .Permalink }}" />
+ {{ if .Params.ogimage }}
+ <meta property="og:image" content="{{ .Params.ogimage }}" />
+ {{ end }} \ No newline at end of file