Add support for _index.md. Close #31

This commit is contained in:
Dmitry Kolosov 2020-05-07 22:02:59 +03:00
parent 1074bfcae3
commit 2fc2766a24
3 changed files with 10 additions and 0 deletions

View File

@ -1,4 +1,7 @@
{{ define "main" }} {{ define "main" }}
<div class="index-content">
{{ .Content }}
</div>
<h1>{{ i18n .Title }}</h1> <h1>{{ i18n .Title }}</h1>
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}

View File

@ -1,4 +1,7 @@
{{ define "main" }} {{ define "main" }}
<div class="index-content">
{{ .Content }}
</div>
<h1>{{ i18n .Title }}</h1> <h1>{{ i18n .Title }}</h1>

View File

@ -1,4 +1,8 @@
{{ define "main" }} {{ define "main" }}
<div class="homepage-content">
{{ .Content }}
</div>
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ range (.Paginate $pages).Pages }} {{ range (.Paginate $pages).Pages }}
<article class="post-list"> <article class="post-list">