Skip to content

setting pagination with eleventyComputed and then using pagination.item[0] in an eleventyComputed permalink #3341

Closed Answered by olets
olets asked this question in Q&A
Discussion options

You must be logged in to vote

Got it :shipit:

Non-eleventyComputed data file data must be read earlier because this works

---
pagination:
  data: #
---
export default { // I'm using ESM with the latest v3 canary (3.0.0-alpha.14)
  eleventyComputed: {
    permalink: ({ pagination }) => pagination.items[0].permalink,
  },
  pagination: {
    alias: "myalias",
    size: 1,
  }),
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by olets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant