Skip to content

Commit

Permalink
Remove workaround for index page of surveys (#1404)
Browse files Browse the repository at this point in the history
Now that nuxt/content#1237 is closed.
  • Loading branch information
tobiasdiez committed Sep 13, 2022
1 parent bb2e21a commit 3f05992
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
File renamed without changes.
9 changes: 3 additions & 6 deletions pages/surveys/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ let markdownPath = 'surveys/'
if (typeof route.params.slug === 'string') {
markdownPath += route.params.slug
} else {
// Workaround for https://github.com/nuxt/content/issues/1237: use /home.md instead /index.md as default
const slugs = route.params.slug
if (slugs[slugs.length - 1] === '') {
slugs[slugs.length - 1] = 'home'
}
markdownPath += slugs.map((param) => param.toLowerCase()).join('/')
markdownPath += route.params.slug
.map((param) => param.toLowerCase())
.join('/')
}
</script>

0 comments on commit 3f05992

Please sign in to comment.