mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

budparr
09.38.2018 ebb7dc3b45615155cc58c0f03b0a0f89c6610f7d
Add Related Content to sidebar
1 files modified
21 ■■■■■ changed files
layouts/partials/menu-contextual.html 21 ●●●●● patch | view | raw | blame | history
layouts/partials/menu-contextual.html
@@ -1,6 +1,23 @@
{{- if .Params.toc -}}
  <div class="bg-light-gray mb-4 pa3 nested-list-reset nested-copy-line-height nested-links">
    <p class="list b mb3">What's in this {{ humanize .Type }}</p>
  <div class="bg-light-gray pa3 nested-list-reset nested-copy-line-height nested-links">
    <p class="f5 b mb3">What's in this {{ humanize .Type }}</p>
      {{ .TableOfContents }}
  </div>
{{- end -}}
{{ $related := .Site.RegularPages.Related . | first 15 }}
{{ with $related }}
  <div class="bg-light-gray pa3 nested-list-reset nested-copy-line-height nested-links">
    <p class="f5 b mb3">Related</p>
    <ul class="pa0 list">
       {{ range . }}
         <li  class="mb2">
          <a href="{{ .RelPermalink }}">
            {{- .Title -}}
          </a>
        </li>
        {{ end }}
    </ul>
</div>
{{ end }}