-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: configure redirects from vuepress site
- Loading branch information
1 parent
5cad7cf
commit c9ea868
Showing
5 changed files
with
18 additions
and
9 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export default defineNuxtRouteMiddleware((to, from) => { | ||
if (to.path === '/getting-started') { | ||
const { selectedFramework } = useFramework(); | ||
return navigateTo('/getting-started/' + selectedFramework.value.name); | ||
} | ||
let path = to.path; | ||
|
||
// remove framework (vue/react) from paths for customization | ||
if (path.includes('/customization') || path.includes('/browser-support') || path.includes('components.html') || path.includes('blocks.html') || path.includes('hooks.html')) { | ||
path = path.replace('/vue', '').replace('/react', ''); | ||
} | ||
if (path.includes('.html')) { | ||
return navigateTo(path.replace('.html', '').toLowerCase()); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters