1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-11-24 21:20:17 +01:00
hugo-theme-bootstrap4-blog/layouts/partials/sidebar.html
Alan Orth 3a6bed5be7
layouts: Use Markdown filter on titles
This makes it possible to have Black Friday config options like
quote style also affect post titles.
2016-10-06 14:17:59 +03:00

31 lines
933 B
HTML

<aside class="col-sm-3 offset-sm-1 blog-sidebar">
{{ if isset .Site.Params.sidebar "about" }}
<section class="sidebar-module sidebar-module-inset">
<h4>{{ i18n "about" }}</h4>
<p>{{ .Site.Params.sidebar.about | markdownify }}</p>
</section>
{{ end }}
{{ $num_recent_posts := (index .Site.Params.sidebar "num_recent_posts" | default 5) }}
<section class="sidebar-module">
<h4>{{ i18n "recentPosts" }}</h4>
<ol class="list-unstyled">
{{ range first $num_recent_posts (where .Site.Pages "Type" "post") }}
<li><a href="{{.RelPermalink}}">{{.Title | markdownify }}</a></li>
{{ end }}
</ol>
</section>
{{ with .Site.Menus.sidebar }}
<section class="sidebar-module">
<h4>Links</h4>
<ol class="list-unstyled">
{{ range . }}
<li><a href="{{ .URL | absURL }}">{{ .Name }}</a></li>
{{ end }}
</ol>
</section>
{{ end }}
</aside><!-- /.blog-sidebar -->