From d0a64d21fa2a7d1777bbcdf225c9c92d4a44befc Mon Sep 17 00:00:00 2001 From: Patrick de Ritter Date: Tue, 24 Jan 2017 11:48:21 +0100 Subject: [PATCH 1/2] Social Fix Fixes the broken [social] parameters in config.toml by placing them under [params], and fixes references to those parameters. --- exampleSite/config.toml | 1 - layouts/index.html | 2 +- layouts/partials/social.html | 20 ++++++++++---------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 6620350..0f7eb45 100755 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -19,7 +19,6 @@ theme = "hugo-sustain" custom_css = [] custom_js = [] -[social] Github = "username" Email = "email@example.com" Twitter = "username" diff --git a/layouts/index.html b/layouts/index.html index d1fa20e..cb52cc7 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -11,7 +11,7 @@

I love all things computer science and maths.

Have a look at some of my working projects.

For more check out my academic & professional Resume.

-

Contact me at @{{ .Site.Social.Twitter }} or by email.

+

Contact me at @{{ .Site.Params.Twitter }} or by email.

{{ partial "social.html" . }} diff --git a/layouts/partials/social.html b/layouts/partials/social.html index 067c391..89c2374 100755 --- a/layouts/partials/social.html +++ b/layouts/partials/social.html @@ -1,23 +1,23 @@

- {{ if .Site.Social.Github }} - + {{ if .Site.Params.Github }} + {{ end }} - {{ if .Site.Social.Email }} - + {{ if .Site.Params.Email }} + {{ end }} - {{ if .Site.Social.Twitter }} - + {{ if .Site.Params.Twitter }} + {{ end }} - {{ if .Site.Social.LinkedIn }} - + {{ if .Site.Params.LinkedIn }} + {{ end }} - {{ if .Site.Social.Stackoverflow }} - + {{ if .Site.Params.Stackoverflow }} + {{ end }}

From 084c128b5b0aa71c963b0bceabb12d761d2c7912 Mon Sep 17 00:00:00 2001 From: Patrick de Ritter Date: Mon, 6 Feb 2017 08:44:09 +0100 Subject: [PATCH 2/2] Changed to [params.social] for better organization --- exampleSite/config.toml | 1 + layouts/index.html | 2 +- layouts/partials/social.html | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 0f7eb45..49233a1 100755 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -19,6 +19,7 @@ theme = "hugo-sustain" custom_css = [] custom_js = [] +[params.social] Github = "username" Email = "email@example.com" Twitter = "username" diff --git a/layouts/index.html b/layouts/index.html index cb52cc7..43fcdae 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -11,7 +11,7 @@

I love all things computer science and maths.

Have a look at some of my working projects.

For more check out my academic & professional Resume.

-

Contact me at @{{ .Site.Params.Twitter }} or by email.

+

Contact me at @{{ .Site.Params.Social.Twitter }} or by email.

{{ partial "social.html" . }} diff --git a/layouts/partials/social.html b/layouts/partials/social.html index 89c2374..829dce8 100755 --- a/layouts/partials/social.html +++ b/layouts/partials/social.html @@ -1,23 +1,23 @@