oxil-net1
Version:
Oxford Information Labs Netistrar Theme
14 lines (13 loc) • 508 B
HTML
{{- $theme := .Get "theme"}}
<div class="px1 px2l grid flex flex-grid flex-wrap flex-gutter-3">
{{- $page_link := $.Page.Permalink -}}
{{- $categories := $.Page.Params.categories -}}
{{- $c := 0 -}}
{{- range $page := .Site.Pages -}}
{{- $has_common_categories := intersect $categories .Params.categories | len | lt 0 -}}
{{- if and $has_common_categories (ne $page_link $page.Permalink) (lt ($.Scratch.Get "$c") 20)}}
{{- $.Scratch.Add "$c" 1 -}}
{{- partial "sub-blog" . -}}
{{- end -}}
{{- end -}}
</div>