Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

80
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda