Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

77
Views
11ty pagation across multiple directories / multiple pagation

Im using Eleventy/11ty site generator and I have a myData object structured like this

[ {name: one, data: [1,2,3]},
  {name: two, data: [1,2,3,4]} ]

And I want to generate a set of paged directories of each, for example

/one/1.html, /one/2.html etc
/two/1.html, /two/2.html etc

Im able to use

pagination:
  data: myData
  size: 1
  alias: test
permalink: "{{ test.name | slug }}/index.html"

to generate a single html file (/one/index.html) with all the data from the object named "one". However I cant figure out how to additionally page that data to get the desired structure.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You should be able to use computed data + JS front matter to get this to work:

~~~js
{
  pagination: {
    data: "flattenedData",
    size: 1,
    alias: "test",
  },
  permalink: "{{ test.name | slugify }}/{{ test.data }}",
  eleventyComputed: {
    flattenedData: ({ myData }) => 
      myData.flatMap(({ name, data }) =>
        data.map(d => ({ name, data: d }))
      )
  }
}
~~~
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!