How to override Layout.vue when extending the default theme in VuePress 2 #1665
Unanswered
nancy1234567890
asked this question in
Q&A
Replies: 1 comment
-
What your described should be legacy VuePress v1 things. VuePress v2 is using a totally different way to extend default theme (see https://ecosystem.vuejs.press/themes/default/extending.html) Also it's suggested to read the v2 docs first |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working with VuePress 2 and want to customize the main layout of my site. I understand that when you extend the default theme (by using extends: '@vuepress/theme-default' in .vuepress/theme/index.js), you can override components like Navbar.vue or Sidebar.vue by placing them in your theme folder under .vuepress/theme/components/.
However, I'm unsure if it's possible to override the main layout (Layout.vue) in the same way. I've tried placing my own Layout.vue in .vuepress/theme/layouts/Layout.vue, but VuePress still uses the default theme's layout.
Is it possible to override the main layout when extending the default theme in VuePress 2?
Or is creating a full custom theme the only way to use a custom layout for all pages
Beta Was this translation helpful? Give feedback.
All reactions