Skip to content

Commit

Permalink
fix: remove _locales references
Browse files Browse the repository at this point in the history
  • Loading branch information
chdecultot committed Aug 14, 2024
1 parent 7014dc8 commit 13a115d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion pages/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ if (!page.value) {
const { data: surround } = await useAsyncData(`${route.path}-surround`, () => queryContent(`/${locale.value}`)
.where({ _extension: 'md', navigation: { $ne: false } })
.where({ _locale: locale.value })
.only(['title', 'description', '_path'])
.findSurround(`/${locale.value}`)
, { default: () => [] })
Expand Down
4 changes: 0 additions & 4 deletions pages/blog/[slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@ const {
} = useRoute();
const { locale } = useI18n()
const path_without_locale = route
path_without_locale.path.replace(`/^(/${locale}\.)/,"")`, '')
const { data: post } = await useAsyncData(`/${locale.value}/blog/${slug}`, () => queryContent<BlogPost>(`/${locale.value}/blog/${slug}`).findOne())
if (!post.value) {
throw createError({ statusCode: 404, statusMessage: 'Post not found', fatal: true })
}
const { data: surround } = await useAsyncData(`/${locale.value}/blog/${slug}-surround`, () => queryContent(`/${locale.value}/blog`)
.where({ _extension: 'md' })
.where({ _locale: locale.value})
.without(['body', 'excerpt'])
.sort({ date: -1 })
.findSurround(`/${locale.value}/blog/${slug}`)
Expand Down

0 comments on commit 13a115d

Please sign in to comment.