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

github.com/nurlansu/hugo-sustain.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick de Ritter <patrickderitter@users.noreply.github.com>2017-02-06 10:44:09 +0300
committerPatrick de Ritter <patrickderitter@users.noreply.github.com>2017-02-06 10:44:09 +0300
commit084c128b5b0aa71c963b0bceabb12d761d2c7912 (patch)
treedd7044c87b157ece9f0eeff45f837a616f5743e8
parentd0a64d21fa2a7d1777bbcdf225c9c92d4a44befc (diff)
Changed to [params.social] for better organization
-rwxr-xr-xexampleSite/config.toml1
-rw-r--r--layouts/index.html2
-rwxr-xr-xlayouts/partials/social.html20
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 @@
<h3>I love all things computer science and maths.</h3>
<h3>Have a look at some of my working <a href="{{ .Site.BaseURL }}projects/"> projects</a>.</h3>
<h3>For more check out my academic &amp; professional <a href="http://biomadeira.github.io/vitae">Resume</a>.</h3>
- <h3>Contact me at <a href="http://twitter.com/{{ .Site.Params.Twitter }}">@{{ .Site.Params.Twitter }}</a> or by <a href="mailto:{{ .Site.Params.Email }}">email</a>.</h3>
+ <h3>Contact me at <a href="http://twitter.com/{{ .Site.Params.Social.Twitter }}">@{{ .Site.Params.Social.Twitter }}</a> or by <a href="mailto:{{ .Site.Params.Social.Email }}">email</a>.</h3>
{{ partial "social.html" . }}
</div>
</section>
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 @@
<div class="social">
<h4>
- {{ if .Site.Params.Github }}
- <a href="http://github.com/{{ .Site.Params.Github }}"><i class="fa fa-github"></i></a>
+ {{ if .Site.Params.Social.Github }}
+ <a href="http://github.com/{{ .Site.Params.Social.Github }}"><i class="fa fa-github"></i></a>
{{ end }}
- {{ if .Site.Params.Email }}
- <a href="mailto:{{ .Site.Params.Email }}"><i class="fa fa-envelope"></i></a>
+ {{ if .Site.Params.Social.Email }}
+ <a href="mailto:{{ .Site.Params.Social.Email }}"><i class="fa fa-envelope"></i></a>
{{ end }}
- {{ if .Site.Params.Twitter }}
- <a href="http://twitter.com/{{ .Site.Params.Twitter }}"><i class="fa fa-twitter"></i></a>
+ {{ if .Site.Params.Social.Twitter }}
+ <a href="http://twitter.com/{{ .Site.Params.Social.Twitter }}"><i class="fa fa-twitter"></i></a>
{{ end }}
- {{ if .Site.Params.LinkedIn }}
- <a href="http://linkedin.com/in/{{ .Site.Params.LinkedIn }}"><i class="fa fa-linkedin"></i></a>
+ {{ if .Site.Params.Social.LinkedIn }}
+ <a href="http://linkedin.com/in/{{ .Site.Params.Social.LinkedIn }}"><i class="fa fa-linkedin"></i></a>
{{ end }}
- {{ if .Site.Params.Stackoverflow }}
- <a href="http://stackoverflow.com/{{ .Site.Params.Stackoverflow }}"><i class="fa fa-stack-overflow"></i></a>
+ {{ if .Site.Params.Social.Stackoverflow }}
+ <a href="http://stackoverflow.com/{{ .Site.Params.Social.Stackoverflow }}"><i class="fa fa-stack-overflow"></i></a>
{{ end }}
</h4>
</div>