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

github.com/coderzh/hugo-pacman-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoderzh <coderzh@gmail.com>2016-05-08 13:10:22 +0300
committercoderzh <coderzh@gmail.com>2016-05-08 13:10:22 +0300
commit604c57f4184ccbeef8340208c5900fe269e968f5 (patch)
tree23bd483b238b73c1028bec6348555947dff4db9e
parent3de96fbfe189a5ebd4c9ab43015bb5f3df8ab988 (diff)
change .Params variable to lowercase
-rw-r--r--exampleSite/content/post/first.md2
-rw-r--r--layouts/partials/article_header.html4
2 files changed, 4 insertions, 2 deletions
diff --git a/exampleSite/content/post/first.md b/exampleSite/content/post/first.md
index ef6e9f2..3e0c28d 100644
--- a/exampleSite/content/post/first.md
+++ b/exampleSite/content/post/first.md
@@ -4,6 +4,8 @@ title = "first"
categories = ["技术文章"]
tags = ["Foo", "Bar"]
toc = true
+author = "coderzh"
+author_homepage = "http://blog.coderzh.com/post/"
+++
diff --git a/layouts/partials/article_header.html b/layouts/partials/article_header.html
index 91235db..8409b8f 100644
--- a/layouts/partials/article_header.html
+++ b/layouts/partials/article_header.html
@@ -3,8 +3,8 @@
<a href="{{ .Permalink }}" title="{{ .Title }}" itemprop="url">{{ .Title }}</a>
</h1>
<p class="article-author">By
- {{ if and (isset .Params "Author") (isset .Params "AuthorHomepage") }}
- <a href="{{ .Params.author_homepage }}" title="{{ .Params.author }}">{{ .Params.Author }}</a>
+ {{ if and (isset .Params "author") (isset .Params "author_homepage") }}
+ <a href="{{ .Params.author_homepage }}" title="{{ .Params.author }}">{{ .Params.author }}</a>
{{ else }}
<a href="{{ .Site.Params.AuthorHomepage }}" title="{{ .Site.Author.Name }}">{{ .Site.Author.Name }}</a>
{{ end }}