Named routes for Gridsome
See original GitHub issueDescription
For every page inside src/pages/ I specifically added the name (please see the image No.1) property with the names I would like to call my pages inside the website. But after inspecting the .temp/routes.js I could only see the following (please see the image No.2), only Index.vue
and 404.vue
has name property.
Image No.1
Image No.2
Expected result
All the routes should have the name properties
Environment
Libs:
- gridsome version: 0.6.6
- @gridsome/cli version: 0.2.1
Browser:
- [x] Chrome (desktop) version 75
For Tooling issues:
- Node version: 10.15.0
- Platform: Windows
Issue Analytics
- State:
- Created 4 years ago
- Reactions:11
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Dynamic Routing - Gridsome
Dynamic pages are used for client-side routing. Route parameters can be placed in file and directory names by wrapping the name in square...
Read more >Gridsome page routes are now lower case - Stack Overflow
Gridsome changes the uppercase path of /Clients to the lowercase path ... Sorry Wally, looks like you can't use named routes in Gridsome....
Read more >The Answers to All Your Questions About Gridsome Localization
From number, named, as well as date and time formating, this guide brings everything you need to know about Gridsome localization.
Read more >Getting started with Gridsome - LogRocket Blog
Gridsome also provides automatic routing. ... To add a template create a .vue file with the same name as a GraphQL collection to ......
Read more >Build A Custom Publication With Headless Ghost + Gridsome
Templates in Gridsome follow a specific naming convention which uses the type names as defined in the GraphQL schema, so the existing Post.vue...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
What about inferring the route name from the filename, like Nuxt does?
This is an issue I’m still experiencing with v0.7.23
Route names are only generated for index.vue as
home
and for ‘404.vue’ as*
. When using gridsome-plugin-gtm, page view events are only sent to Google Tag Manager for routes that have names. I can manually send the event on page/component mount, but it would be a huge time-saver to have auto-generated, filename-inferred routes like Nuxt does.