We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When i put the parameter draft: true in markdown file, the article continue showing in articles in prod.
draft: true
This should a validation in nuxt/content or alpine?
The text was updated successfully, but these errors were encountered:
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
where
Sorry, something went wrong.
@iamyuu works fine with the need of explicitly adding the draft attribute to all posts, true or false:
draft
https://github.com/nuxt-themes/alpine/blob/f59e470f2ef02d73864ec6ce7ad8757dfdaa4542/components/content/ArticlesList.vue#L12
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:
content/articles/your-post.md
# your draft posts draft: true # published ones draft: false
No branches or pull requests
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?
The text was updated successfully, but these errors were encountered: