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_js = []
[social]
Github = "username"
Email = "email@example.com"
Twitter = "username"

View File

@ -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.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" . }}
</div>
</section>

View File

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