From 8262ab6f2d7b01e134fd3a4d945fbb77e54128bc Mon Sep 17 00:00:00 2001 From: Ghyslain Leclerc Date: Wed, 28 Dec 2016 21:13:54 -0500 Subject: 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. --- layouts/partials/custom_image_handler.html | 2 +- layouts/partials/page_footer.html | 10 +++++----- layouts/partials/page_header.html | 6 +++--- layouts/partials/site_header.html | 12 ++++++------ layouts/rss.xml | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/layouts/partials/custom_image_handler.html b/layouts/partials/custom_image_handler.html index 1271545..ec1ad7f 100644 --- a/layouts/partials/custom_image_handler.html +++ b/layouts/partials/custom_image_handler.html @@ -3,7 +3,7 @@ // @summary: jquery implementation $(function() { // @summary: Use the author's flickr ID to load images from the public flickr feed - $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id={{ .Site.Author.FlickrID }}&format=json&jsoncallback=?", function(data) { + $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id={{ .Site.Author.flickrid }}&format=json&jsoncallback=?", function(data) { iweblog.application.displayImages(data, 8); }); }); diff --git a/layouts/partials/page_footer.html b/layouts/partials/page_footer.html index dc661cf..b76e34f 100644 --- a/layouts/partials/page_footer.html +++ b/layouts/partials/page_footer.html @@ -1,22 +1,22 @@ diff --git a/layouts/partials/page_header.html b/layouts/partials/page_header.html index d566947..a8038a5 100644 --- a/layouts/partials/page_header.html +++ b/layouts/partials/page_header.html @@ -1,8 +1,8 @@
diff --git a/layouts/partials/site_header.html b/layouts/partials/site_header.html index 4bc4168..02198fe 100644 --- a/layouts/partials/site_header.html +++ b/layouts/partials/site_header.html @@ -4,19 +4,19 @@ - - + + {{ .Hugo.Generator }} {{ $.Scratch.Add "title" .Site.Title }} - {{ with .Title }}{{ if ne . ($.Scratch.Get "title") }}{{ . }} · {{ end }}{{ end }}@{{ .Site.Author.Handle }}’s {{ .Site.Title }} + {{ with .Title }}{{ if ne . ($.Scratch.Get "title") }}{{ . }} · {{ end }}{{ end }}@{{ .Site.Author.handle }}’s {{ .Site.Title }} {{ partial "custom_stylesheets.html" . }} - {{ if .Site.Params.RSSEnabled }} - - {{ end }} + {{ if .Site.Params.rssenabled }} + + {{ end }} diff --git a/layouts/rss.xml b/layouts/rss.xml index 243ab90..ddc64ce 100644 --- a/layouts/rss.xml +++ b/layouts/rss.xml @@ -1,7 +1,7 @@ - @{{ .Site.Author.Handle }}’s {{ .Site.Title }}{{ with .Title }} - {{ . }}{{ end }} + @{{ .Site.Author.handle }}’s {{ .Site.Title }}{{ with .Title }} - {{ . }}{{ end }} {{ .Permalink }} All entries {{ with .Title }}in {{.}} {{ end }}on {{ .Site.Title }} Hugo -- gohugo.io -- cgit v1.2.3 From e455fb9170413f696e23572863a3d277bb0b5875 Mon Sep 17 00:00:00 2001 From: Ghyslain Leclerc Date: Wed, 28 Dec 2016 21:28:07 -0500 Subject: Fixed the .Site.Author.name reference to use currently recommended info. Now uses .Site.Author.firstname and .Site.Author.lastname. --- layouts/rss.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/rss.xml b/layouts/rss.xml index ddc64ce..2d352a9 100644 --- a/layouts/rss.xml +++ b/layouts/rss.xml @@ -15,7 +15,7 @@ {{ .Title }} {{ .Permalink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ with .Site.Author.email }}{{.}}{{end}} ({{ with .Site.Author.firstname }}{{.}}{{ end }} {{ with .Site.Author.lastname }}{{.}}{{end}}) {{ .Permalink }} {{ .Content | html }} -- cgit v1.2.3 From bf5081d4eee91ed79d2dc273772a4130114e65f6 Mon Sep 17 00:00:00 2001 From: Ghyslain Leclerc Date: Wed, 28 Dec 2016 21:33:27 -0500 Subject: Made the Flickr images in the footer optional. If the FlickID parameter in the Author section in the config is not set or if it is set to the empty string, the section is not inserted in the footer. --- layouts/partials/page_footer.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/partials/page_footer.html b/layouts/partials/page_footer.html index b76e34f..19a39b5 100644 --- a/layouts/partials/page_footer.html +++ b/layouts/partials/page_footer.html @@ -6,11 +6,13 @@ {{ partial "bio.html" . }}

+ {{ if isset .Site.Author "flickrid" | and ( not ( eq .Site.Author.flickrid "" ) ) }} + {{ end }} {{ if .Site.Params.showcopyright }} -- cgit v1.2.3 From 2d82d19d1413c5990acdbef0679b83ddcc6c702f Mon Sep 17 00:00:00 2001 From: Ghyslain Leclerc Date: Wed, 28 Dec 2016 21:36:08 -0500 Subject: Completed the author meta information in the site header with the last name. --- layouts/partials/site_header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/site_header.html b/layouts/partials/site_header.html index 02198fe..daaf2c0 100644 --- a/layouts/partials/site_header.html +++ b/layouts/partials/site_header.html @@ -4,7 +4,7 @@ - + {{ .Hugo.Generator }} -- cgit v1.2.3 From e87daf2a2db8667994c7910b69d3a7429ec4bd8d Mon Sep 17 00:00:00 2001 From: Ghyslain Leclerc Date: Thu, 29 Dec 2016 01:47:06 -0500 Subject: Added a https to a layout. --- layouts/partials/custom_image_handler.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/custom_image_handler.html b/layouts/partials/custom_image_handler.html index ec1ad7f..e953884 100644 --- a/layouts/partials/custom_image_handler.html +++ b/layouts/partials/custom_image_handler.html @@ -3,7 +3,7 @@ // @summary: jquery implementation $(function() { // @summary: Use the author's flickr ID to load images from the public flickr feed - $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id={{ .Site.Author.flickrid }}&format=json&jsoncallback=?", function(data) { + $.getJSON("https://api.flickr.com/services/feeds/photos_public.gne?id={{ .Site.Author.flickrid }}&format=json&jsoncallback=?", function(data) { iweblog.application.displayImages(data, 8); }); }); -- cgit v1.2.3