deno.land / x / lume_theme_simple_blog@v0.4.0 / src / archive.tmpl.js
1234567891011121314151617181920212223242526272829export const layout = "layouts/archive.njk";export const title = "Archive";
export default function* ({ search, paginate }) { const posts = search.pages("type=post", "date=desc");
for ( const data of paginate(posts, { url, size: 10 }) ) { // Show the first page in the menu if (data.pagination.page === 1) { data.menu = { visible: true, order: 1, }; }
yield data; }}
function url(n) { if (n === 1) { return "/archive/"; }
return `/archive/${n}/`;}
Version Info