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

github.com/htdvisser/hugo-base16-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHylke Visser <htdvisser@gmail.com>2015-12-20 18:18:51 +0300
committerHylke Visser <htdvisser@gmail.com>2015-12-20 18:18:51 +0300
commitac88db2aecaaf9dd768f53d65947cb5de1d5f460 (patch)
tree5357b891eff37e76cb9107b490a39071c2836ff8
parentdcdf7bcbef9c4207a597fb1620c64be7f0da4301 (diff)
Use description, keywords and author
Works with `description` and `author` from `config.toml`: ``` [params] description = "Tesla's Awesome Hugo Site" author = "Nikola Tesla" ``` Works with `description` and `keywords` from frontmatter: ``` description = "spf13-vim is a cross platform distribution of vim plugins and resources for Vim." keywords = ".vimrc,plugins,spf13-vim,vim" ``` Closes #5
-rw-r--r--layouts/partials/header.html3
1 files changed, 3 insertions, 0 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 205181c..362f6d1 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -2,6 +2,9 @@
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
<head>
<meta charset="utf-8">
+<meta name="description" content="{{ if eq .Description "" }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}">
+<meta name="keywords" content="{{ .Keywords }}">
+<meta name="author" content="{{ .Site.Params.author }}">
{{ .Hugo.Generator }}
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/style.css" type="text/css">