Skip to content

Commit

Permalink
fix: ignore redirected contents (#428)
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz authored Jun 15, 2021
1 parent 2f01735 commit c4199cd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/defaultTheme/components/templates/Docs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,18 @@ export default defineComponent({
const [prevLink, nextLink] = await $docus
.search({ deep: true })
.where({ language, draft, navigation: { $ne: false } })
.where({
language,
draft,
navigation: {
$and: [
// Ignore contents that has disabled navigations
{ $ne: false },
// Ignore contents with navigation redirect
{ $containsNone: ['redirect'] }
]
}
})
.only(['title', 'slug', 'to', 'category'])
.sortBy('position', 'asc')
.surround(props.page.slug, { before: 1, after: 1 })
Expand Down

0 comments on commit c4199cd

Please sign in to comment.