Files
reference/themes/coo/scripts/pagination_generator.js
T
FireIsGood ef823489fe fix: format complex changes
Formats all the general js files. Separate in case these should be
treated differently for any reason. This commit includes all javascript
and HTML files.
2024-05-16 14:37:00 -07:00

15 lines
398 B
JavaScript

let pagination = require("hexo-pagination");
hexo.extend.generator.register("notes-pagination", function (locals) {
let config = this.config;
let posts = locals.posts.filter((post) => post.layout === "note").sort("-date");
return pagination("notes", posts, {
perPage: config.per_page,
layout: ["notes"],
format: "%d/",
data: {
_isNotePagination: true,
},
});
});