From 8b9b41d26c012566665a3b09d4c43e7a6a1e262f Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Fri, 29 Dec 2017 11:49:46 -0800 Subject: [PATCH] fix pagination --- bootstrap/main.go | 14 +------------- bootstrap/src/index.md | 1 + 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/bootstrap/main.go b/bootstrap/main.go index 7c2bbdd..5e69d77 100644 --- a/bootstrap/main.go +++ b/bootstrap/main.go @@ -39,7 +39,6 @@ import ( "github.com/FooSoft/goldsmith-plugins/tags" "github.com/FooSoft/goldsmith-plugins/thumbnail" "github.com/PuerkitoBio/goquery" - "github.com/russross/blackfriday" ) func fixup(doc *goquery.Document) error { @@ -69,20 +68,9 @@ func (b *builder) Build(srcDir, dstDir string) { "Layout": "index", } - markdownFlags := blackfriday.EXTENSION_TABLES | - blackfriday.EXTENSION_FENCED_CODE | - blackfriday.EXTENSION_AUTOLINK | - blackfriday.EXTENSION_STRIKETHROUGH | - blackfriday.EXTENSION_SPACE_HEADERS | - blackfriday.EXTENSION_HEADER_IDS | - blackfriday.EXTENSION_BACKSLASH_LINE_BREAK | - blackfriday.EXTENSION_DEFINITION_LISTS | - blackfriday.EXTENSION_NO_EMPTY_LINE_BEFORE_BLOCK | - blackfriday.EXTENSION_AUTO_HEADER_IDS - errs := goldsmith.Begin(srcDir). Chain(frontmatter.New()). - Chain(markdown.New().MarkdownFlags(markdownFlags)). + Chain(markdown.New()). Chain(collection.New()). Chain(paginate.New("Groups.Blog").ItemsPerPage(3)). Chain(index.New(indexMeta)). diff --git a/bootstrap/src/index.md b/bootstrap/src/index.md index 5bb0e55..7f7447f 100644 --- a/bootstrap/src/index.md +++ b/bootstrap/src/index.md @@ -3,5 +3,6 @@ Area = "blog" CrumbName = "blog" Layout = "collection" Title = "Blog" +Paginate = true +++