Fix template to suport empty social parameter
This commit is contained in:
parent
941c9a741f
commit
853492596d
|
@ -23,10 +23,6 @@ Add the following lines to your `config.toml`.
|
||||||
```toml
|
```toml
|
||||||
theme = "coder" # set the theme
|
theme = "coder" # set the theme
|
||||||
|
|
||||||
[permalinks] # configure post and fixed pages permalinks
|
|
||||||
post = "posts/:title/"
|
|
||||||
default = ":title/"
|
|
||||||
|
|
||||||
[params] # theme parameters
|
[params] # theme parameters
|
||||||
author = "John Doe" # author's name
|
author = "John Doe" # author's name
|
||||||
info = "Full Stack DevOps and Magician" # author's job title or info
|
info = "Full Stack DevOps and Magician" # author's job title or info
|
||||||
|
@ -83,4 +79,5 @@ Coder is licensed under the [MIT license](https://github.com/luizdepra/hugo-code
|
||||||
|
|
||||||
## Special Thanks
|
## Special Thanks
|
||||||
|
|
||||||
- Gleen McComb, for his great [article](https://glennmccomb.com/articles/how-to-build-custom-hugo-pagination/) about custom pagination.
|
- Gleen McComb, for his great [article](https://glennmccomb.com/articles/how-to-build-custom-hugo-pagination/) about custom pagination.
|
||||||
|
- All contributors, for every PR and Issue reported.\
|
||||||
|
|
|
@ -12,10 +12,6 @@ pygmentsstyle = "b2"
|
||||||
pygmentscodefences = true
|
pygmentscodefences = true
|
||||||
pygmentscodefencesguesssyntax = true
|
pygmentscodefencesguesssyntax = true
|
||||||
|
|
||||||
[permalinks]
|
|
||||||
posts = "posts/:title/"
|
|
||||||
default = ":title/"
|
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
author = "John Doe"
|
author = "John Doe"
|
||||||
description = "John Doe's personal website"
|
description = "John Doe's personal website"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<a class="navigation-title" href="{{ "/" | absURL }}">
|
<a class="navigation-title" href="{{ "/" | absURL }}">
|
||||||
{{ .Site.Title }}
|
{{ .Site.Title }}
|
||||||
</a>
|
</a>
|
||||||
{{with .Site.Menus.main}}
|
{{ with .Site.Menus.main }}
|
||||||
<ul class="navigation-list float-right">
|
<ul class="navigation-list float-right">
|
||||||
{{ range sort . }}
|
{{ range sort . }}
|
||||||
<li class="navigation-item">
|
<li class="navigation-item">
|
||||||
|
@ -11,6 +11,6 @@
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
{{end}}
|
{{ end }}
|
||||||
</section>
|
</section>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -2,10 +2,12 @@
|
||||||
<div class="about">
|
<div class="about">
|
||||||
<h1>{{ .Site.Params.author }}</h1>
|
<h1>{{ .Site.Params.author }}</h1>
|
||||||
<h2>{{ .Site.Params.info }}</h2>
|
<h2>{{ .Site.Params.info }}</h2>
|
||||||
|
{{ with .Site.Params.social }}
|
||||||
<ul>
|
<ul>
|
||||||
{{ range sort .Site.Params.social }}
|
{{ range sort .}}
|
||||||
<li><a href="{{ .url }}">{{ .name }}</a></li>
|
<li><a href="{{ .url }}">{{ .name }}</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Reference in New Issue