fix: redirect category routes to search route

This commit is contained in:
Ze Bateira
2021-04-21 15:57:48 +01:00
parent 82ce152b64
commit 52af0cfdf1
+7
View File
@@ -53,6 +53,13 @@ export default {
},
},
mounted() {
if (!this.isVisible && this.$root.$page.frontmatter.type) {
const type = this.$root.$page.frontmatter.type
// path is relative to support ipfs sub path deployments
return this.$router.replace({ path: `../?category=${type.slug}` })
}
if (!this.isVisible) {
// path to 404 is relative to support ipfs sub path deployments
return this.$router.replace({ path: '../404' })