Skip to content

Commit

Permalink
fix(pagination): missing changes for computed href fix
Browse files Browse the repository at this point in the history
Forgot to stage files for fix #22, so here it is.
  • Loading branch information
nunof07 committed Apr 19, 2021
1 parent 68693e1 commit cf07020
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"demo:multilingual": "npx @11ty/eleventy --input=examples/multilingual --output=examples/multilingual/_site --config=examples/multilingual/.eleventy.js",
"demo:data-file": "npx @11ty/eleventy --input=examples/data-file --output=examples/data-file/_site --config=examples/data-file/.eleventy.js",
"demo:pagination": "npx @11ty/eleventy --input=examples/pagination --output=examples/pagination/_site --config=examples/pagination/.eleventy.js",
"demo:paginated-archive": "npx @11ty/eleventy --input=examples/paginated-archive --output=examples/paginated-archive/_site --config=examples/paginated-archive/.eleventy.js",
"test": "run-p -c test:*",
"test:eslint": "eslint \"./**/*.js\" --color",
"test:prettier": "prettier --check ./**/*.js",
Expand Down
3 changes: 2 additions & 1 deletion src/paginationItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ module.exports = (item) => {
return [item];
}

return item.data.pagination.pages.map((page) => ({
return item.data.pagination.pages.map((page, index) => ({
...item,
...page,
url: page.url || item.data.pagination.hrefs[index],
}));
};

0 comments on commit cf07020

Please sign in to comment.