mirror of https://github.com/luizdepra/hugo-coder.git

Luiz de Prá
23.28.2018 853492596dd78dedb755e66db8d79d01e13c66b2
Fix template to suport empty social parameter
4 files modified
19 ■■■■■ changed files
README.md 7 ●●●● patch | view | raw | blame | history
exampleSite/config.toml 4 ●●●● patch | view | raw | blame | history
layouts/partials/header.html 4 ●●●● patch | view | raw | blame | history
layouts/partials/home.html 4 ●●● patch | view | raw | blame | history
README.md
@@ -23,10 +23,6 @@
```toml
theme = "coder" # set the theme
[permalinks] # configure post and fixed pages permalinks
    post = "posts/:title/"
    default = ":title/"
[params] # theme parameters
    author = "John Doe" # author's name
    info = "Full Stack DevOps and Magician" # author's job title or info
@@ -83,4 +79,5 @@
## 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.\
exampleSite/config.toml
@@ -12,10 +12,6 @@
pygmentscodefences = true
pygmentscodefencesguesssyntax = true
[permalinks]
    posts = "posts/:title/"
    default = ":title/"
[params]
    author = "John Doe"
    description = "John Doe's personal website"
layouts/partials/header.html
@@ -3,7 +3,7 @@
    <a class="navigation-title" href="{{ "/" | absURL }}">
      {{ .Site.Title }}
    </a>
    {{with .Site.Menus.main}}
    {{ with .Site.Menus.main }}
    <ul class="navigation-list float-right">
      {{ range sort . }}
      <li class="navigation-item">
@@ -11,6 +11,6 @@
      </li>
      {{ end }}
    </ul>
    {{end}}
    {{ end }}
  </section>
</nav>
layouts/partials/home.html
@@ -2,10 +2,12 @@
  <div class="about">
    <h1>{{ .Site.Params.author }}</h1>
    <h2>{{ .Site.Params.info }}</h2>
    {{ with .Site.Params.social }}
    <ul>
      {{ range sort .Site.Params.social }}
      {{ range sort .}}
      <li><a href="{{ .url }}">{{ .name }}</a></li>
      {{ end }}
    </ul>
    {{ end }}
  </div>
</section>