Open doguskysilva opened 9 months ago
I think that should be part of alpine (since this is a theme)
add where
on this line:
https://github.com/nuxt-themes/alpine/blob/f59e470f2ef02d73864ec6ce7ad8757dfdaa4542/components/content/ArticlesList.vue#L12
@iamyuu works fine with the need of explicitly adding the draft
attribute to all posts, true or false:
here's the updated line:
const { data: _articles } = await useAsyncData('articles', async () => await queryContent(withTrailingSlash(props.path)).where({draft: false}).sort({ date: -1 }).find())
in your content/articles/your-post.md
always add this:
# your draft posts
draft: true
# published ones
draft: false
When i put the parameter
draft: true
in markdown file, the article continue showing in articles in prod.This should a validation in nuxt/content or alpine?