Skip to content

Commit

Permalink
filter not draft
Browse files Browse the repository at this point in the history
  • Loading branch information
naimsolong authored Feb 17, 2024
1 parent 2cf4658 commit cfca0f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pages/posts/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { useAsyncData, useCookie, useRuntimeConfig } from 'nuxt/app';
import { PostHog } from 'posthog-node';
import { profile } from '~/datas/root'
const posts = await queryContent('posts').only(['id', 'title', 'description', 'image', '_path']).sort({ published: -1 }).limit(50).find()
const posts = await queryContent('posts').only(['id', 'title', 'description', 'image', '_path']).where({ draft: false }).sort({ published: -1 }).limit(50).find()
useSeoMeta({
author: profile.fullname,
Expand Down
2 changes: 1 addition & 1 deletion pages/projects/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { useAsyncData, useCookie, useRuntimeConfig } from 'nuxt/app';
import { PostHog } from 'posthog-node';
import { profile } from '~/datas/root'
const projects = await queryContent('projects').only(['id', 'title', 'description', 'image', '_path']).sort({ published: -1 }).limit(50).find()
const projects = await queryContent('projects').only(['id', 'title', 'description', 'image', '_path']).where({ draft: false }).sort({ published: -1 }).limit(50).find()
useSeoMeta({
author: profile.fullname,
Expand Down

0 comments on commit cfca0f5

Please sign in to comment.