From a67c114815966104d69139a5a5f48dec42e43481 Mon Sep 17 00:00:00 2001 From: Badri Sunderarajan Date: Mon, 9 Mar 2020 18:45:40 +0530 Subject: [PATCH] Paginate homepage --- src/pages/Index.vue | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/pages/Index.vue b/src/pages/Index.vue index 23a7dd6..bedc9e6 100644 --- a/src/pages/Index.vue +++ b/src/pages/Index.vue @@ -26,14 +26,28 @@
+ + + -{ +query Posts($page: Int) { posts: allGhostPost( sortBy: "published_at", order: DESC, - ) { + perPage: 6, + page: $page, + ) @paginate { + pageInfo { + totalPages + currentPage + } edges { node { title