Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incremental builds doesn't work with paginated collection #2992

Open
monochromer opened this issue Jul 12, 2023 · 1 comment
Open

Incremental builds doesn't work with paginated collection #2992

monochromer opened this issue Jul 12, 2023 · 1 comment

Comments

@monochromer
Copy link
Contributor

monochromer commented Jul 12, 2023

I have collection, created with addCollection:

// eleventy.config.js

eleventyConfig.addCollection('articles', (collectionAPI) => {
  return collectionAPI.getFilteredByGlob('src/articles/*/*.md')
})

and data file for article template, that uses collection articles for pagination:

// src/pages/article/article.11tydata.js

module.exports = {
  layout: 'base',

  pagination: {
    data: 'collections.articles',
    size: 1,
    alias: 'article'
  },

  eleventyImport: {
    collections: ['articles']
  }
}

when i change md-file, template doesn't render in incremental mode:

[11ty] File changed: src/articles/one/index.md
[11ty] Wrote 0 files (skipped 32) in 0.03 seconds (v2.0.1)

Originally posted by @monochromer in #975 (comment)

Example code: https://stackblitz.com/edit/stackblitz-starters-6114gn?file=_layouts%2Fbase.njk

@monochromer
Copy link
Contributor Author

Is it possible to solve problem using getFilteredByGlob and data-file with pagination option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant