Made the theme compatible with Hugo 0.18.

At least in Hugo 0.18 (I don't know for prior versions), the variables in the
templates are all set to lowercase even if they are not lowercase in the
config file.

For instance, for a configuration as follows:
[Author]
   Handle = "bla"
the variable must be used as .Site.Author.handle and not .Site.Author.Handle.
This commit is contained in:
Ghyslain Leclerc 2016-12-28 21:13:54 -05:00
parent 6a9c9a5469
commit 8262ab6f2d
5 changed files with 16 additions and 16 deletions

View file

@ -4,19 +4,19 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="{{ with .Site.Author.FirstName }}{{ . }}{{ end }}">
<meta name="description" content="{{ with .Site.Params.Description }}{{ . }}{{ end }}">
<meta name="author" content="{{ with .Site.Author.firstname }}{{ . }}{{ end }}">
<meta name="description" content="{{ with .Site.Params.description }}{{ . }}{{ end }}">
{{ .Hugo.Generator }}
{{ $.Scratch.Add "title" .Site.Title }}
<title>{{ with .Title }}{{ if ne . ($.Scratch.Get "title") }}{{ . }} &middot; {{ end }}{{ end }}@{{ .Site.Author.Handle }}s {{ .Site.Title }}</title>
<title>{{ with .Title }}{{ if ne . ($.Scratch.Get "title") }}{{ . }} &middot; {{ end }}{{ end }}@{{ .Site.Author.handle }}s {{ .Site.Title }}</title>
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/weblog.css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.2.14/css/lightgallery.min.css" type="text/css" />
{{ partial "custom_stylesheets.html" . }}
{{ if .Site.Params.RSSEnabled }}
<link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
{{ if .Site.Params.rssenabled }}
<link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
</head>
<body class="site">