Skip to content

“Alias” for eleventyExcludeFromCollections: true? #1950

Answered by daflh
j9t asked this question in Q&A
Discussion options

You must be logged in to vote

You can use Computed Data inside your posts directory like this:

// ./posts/posts.11tydata.js

module.exports = {
  eleventyComputed: {
    eleventyExcludeFromCollections: data => (data.eleventyExcludeFromCollections || data.hidden)
  }
};

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@j9t
Comment options

@daflh
Comment options

@j9t
Comment options

Answer selected by j9t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants