deno.land / x / lume@v2.1.4 / tests / assets / multilanguage / pagination.page.js

pagination.page.js
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
export const layout = "layout.vto";
export default function* ({ search, paginate }) { for (const p of paginate(search.pages("lang=gl", "url=asc"))) { yield { ...p, lang: "gl", id: `page-${p.pagination.page}`, }; } for (const p of paginate(search.pages("lang=en", "url=asc"))) { yield { ...p, lang: "en", id: `page-${p.pagination.page}`, }; }}
lume

Version Info

Tagged at
7 months ago