Social Fix

Fixes the broken [social] parameters in config.toml by placing them
under [params], and fixes references to those parameters.
This commit is contained in:
Patrick de Ritter 2017-01-24 11:48:21 +01:00
parent 0cdecb5131
commit d0a64d21fa
3 changed files with 11 additions and 12 deletions

View File

@ -19,7 +19,6 @@ theme = "hugo-sustain"
custom_css = [] custom_css = []
custom_js = [] custom_js = []
[social]
Github = "username" Github = "username"
Email = "email@example.com" Email = "email@example.com"
Twitter = "username" Twitter = "username"

View File

@ -11,7 +11,7 @@
<h3>I love all things computer science and maths.</h3> <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>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>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.Social.Twitter }}">@{{ .Site.Social.Twitter }}</a> or by <a href="mailto:{{ .Site.Social.Email }}">email</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>
{{ partial "social.html" . }} {{ partial "social.html" . }}
</div> </div>
</section> </section>

View File

@ -1,23 +1,23 @@
<div class="social"> <div class="social">
<h4> <h4>
{{ if .Site.Social.Github }} {{ if .Site.Params.Github }}
<a href="http://github.com/{{ .Site.Social.Github }}"><i class="fa fa-github"></i></a> <a href="http://github.com/{{ .Site.Params.Github }}"><i class="fa fa-github"></i></a>
{{ end }} {{ end }}
{{ if .Site.Social.Email }} {{ if .Site.Params.Email }}
<a href="mailto:{{ .Site.Social.Email }}"><i class="fa fa-envelope"></i></a> <a href="mailto:{{ .Site.Params.Email }}"><i class="fa fa-envelope"></i></a>
{{ end }} {{ end }}
{{ if .Site.Social.Twitter }} {{ if .Site.Params.Twitter }}
<a href="http://twitter.com/{{ .Site.Social.Twitter }}"><i class="fa fa-twitter"></i></a> <a href="http://twitter.com/{{ .Site.Params.Twitter }}"><i class="fa fa-twitter"></i></a>
{{ end }} {{ end }}
{{ if .Site.Social.LinkedIn }} {{ if .Site.Params.LinkedIn }}
<a href="http://linkedin.com/in/{{ .Site.Social.LinkedIn }}"><i class="fa fa-linkedin"></i></a> <a href="http://linkedin.com/in/{{ .Site.Params.LinkedIn }}"><i class="fa fa-linkedin"></i></a>
{{ end }} {{ end }}
{{ if .Site.Social.Stackoverflow }} {{ if .Site.Params.Stackoverflow }}
<a href="http://stackoverflow.com/{{ .Site.Social.Stackoverflow }}"><i class="fa fa-stack-overflow"></i></a> <a href="http://stackoverflow.com/{{ .Site.Params.Stackoverflow }}"><i class="fa fa-stack-overflow"></i></a>
{{ end }} {{ end }}
</h4> </h4>
</div> </div>