Incorrect pages generated with layout plugin
See original GitHub issueWith vite-plugin-vue-layouts
Without vite-plugin-vue-layouts
Vite-SSG plugin example
With the layout plugin, extra folders are created and the content is same as index.html
When i visit /readme, i get the content from readme folder instead of correct readme.html
Please let me know if this the expected behaviour or a bug.
I am big fan of your open source work 😃 Thank you!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Troubleshooting Layout Issues - Elementor
To find a plugin that is causing the layout issue, deactivate all of your plugins except Elementor and Elementor Pro, if applicable. If...
Read more >How to edit page not template - WordPress.org
Problem is that I was able to customize the template via the Gutenverse plugin, but when I go to Pages, each page that...
Read more >Advanced Layout Editor hangs; loading wheel keeps spinning ...
Hello, We are experiencing some issues with our site (URL in private section). On certain pages, when entering edit mode, everything will ...
Read more >WordPress Changes Not Showing? 3 Methods to Fix It Right ...
When WordPress is not showing changes right away, it is most likely still displaying a cached version. Learn three ways to fix this...
Read more >hannoeru/vite-plugin-pages: File system based route ... - GitHub
By default a page is a Vue component exported from a .vue or .js file in the src/pages directory. You can access the...
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 FreeTop 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
Top GitHub Comments
Just fixed empty string problem with vite-ssg, can you try it?
Thanks for looking into this @hannoeru.
I had expected a nested router view that has a path starting with
'/'
would just be displayed at root level; without anything weird happening to the routes object. As per the vue router docs#nested routes:So my assumption was, if a root level route had the same path as a children route (with a prefixed
/
), it should be displayed at the same path, and therefore also be rendered at the same path.Replacing the path of children to an empty string
''
(also proposed in the router docs) is possible but always creates adist/.html
file that’s identical withdist/index.html
(if building withvite-ssg
)Could the culprit be this? vite-SSG /utils.ts#L25
That being said: Are there any issues for website visitors that result in missing, wrongly displayed pages? (I’m asking to know if this issue should be high priority for
vite-plugin-vue-layouts
)Regarding
route.name
: Linking to a named page should still work because vue-router looks for names inchildren
.