9 lines
221 B
JavaScript
9 lines
221 B
JavaScript
function filterPublished(post) {
|
|
const isPublished = post.node.frontmatter && post.node.frontmatter.published;
|
|
return process.env.NODE_ENV === 'development' || isPublished;
|
|
}
|
|
|
|
module.exports = {
|
|
filterPublished,
|
|
};
|