Skip to content

Commit

Permalink
fix(list): hidden index markdown file
Browse files Browse the repository at this point in the history
  • Loading branch information
fntsrlike committed Oct 21, 2023
1 parent f4fa036 commit 2216726
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/queryContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const queryPostsRecently = (type: string, count: number) => {
return queryContent(type)
.only(['title', 'title_en', 'created_at', 'published_at', '_path'])
.where(isNotDraft())
.where(excludeIndex(type))
.limit(count)
.sort({ created_at: -1, published_at: -1 })
.find()
Expand Down
2 changes: 1 addition & 1 deletion components/list/PageByRoute.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
import { fetch, queryPosts } from '@/api/queryContent'
const route = useRoute()
const slug = route.fullPath
const slug = route.name?.toString()
const posts = await fetch(`${slug}-list`, () => queryPosts(slug))
</script>

0 comments on commit 2216726

Please sign in to comment.