Skip to content

Commit

Permalink
Allow up to 3x blog posts to appear on main page.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdaehlie committed Nov 8, 2018
1 parent 15530ad commit 9b7bd87
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,21 @@ <h2 class="heading display-4 font-weight-300 lh-110 mb-4">Internet Security Rese
</section>
<section class="slice">
<div class="container">
{{ $posts := where .Site.RegularPages "Type" "in" (slice "post") | first 1 }}
{{ $posts := where .Site.RegularPages "Type" "in" (slice "post") | first 3 }}
{{ range $posts }}
<p>
<h2 class="heading h2">{{ .Title }}</h2>
{{ with .Params.excerpt }}
{{ . | markdownify }}
{{ else }}
{{ .Summary }}
{{ end }}
</p>
<a href="{{ .Permalink }}" class="link font-weight-bold" data-link="1">{{ i18n "read_more" }}</a>
<div class="row row-grid">
<div class="col-md-12 col-lg-12">
<h2 class="heading h2">{{ .Title }}</h2>
<p>
{{ with .Params.excerpt }}
{{ . | markdownify }}
{{ else }}
{{ .Summary }}
{{ end }}
</p>
<a href="{{ .Permalink }}" class="link font-weight-bold" data-link="1">{{ i18n "read_more" }}</a>
</div>
</div>
{{ end }}
</div>
</section>
Expand Down

0 comments on commit 9b7bd87

Please sign in to comment.