1

integrate paginate

This commit is contained in:
Alex Yatskov 2017-12-28 09:32:25 -08:00
parent 18ce27d6d4
commit d5181b4c96
2 changed files with 7 additions and 2 deletions

View File

@ -2,10 +2,13 @@
{{template "header" .}}
{{template "navbar" .}}
<div class="container">
{{range .Meta.Groups.Blog}}
{{range .Meta.Pager.Items}}
<div>
<h1><a href="{{.Path}}">{{.Meta.Title}}</a></h1>
<p>{{.Meta.Content}}</h1>
<p>
{{.Meta.Summary.Intro}}
<a href="{{.Path}}">[&hellip;more]</a>
</p>
</div>
{{end}}
</div>

View File

@ -33,6 +33,7 @@ import (
"github.com/FooSoft/goldsmith-plugins/index"
"github.com/FooSoft/goldsmith-plugins/layout"
"github.com/FooSoft/goldsmith-plugins/markdown"
"github.com/FooSoft/goldsmith-plugins/paginate"
"github.com/FooSoft/goldsmith-plugins/syntax"
"github.com/FooSoft/goldsmith-plugins/tags"
"github.com/FooSoft/goldsmith-plugins/thumbnail"
@ -105,6 +106,7 @@ func (b *builder) Build(srcDir, dstDir string) {
Chain(frontmatter.New()).
Chain(markdown.New().MarkdownFlags(markdownFlags)).
Chain(collection.New()).
Chain(paginate.New("Groups.Blog").Limit(5)).
Chain(index.New(indexMeta)).
Chain(tags.New().IndexMeta(tagMeta)).
Chain(breadcrumbs.New()).