Skip to content

Commit

Permalink
docs: always use 'extends' to extend themes (#3181)
Browse files Browse the repository at this point in the history
  • Loading branch information
skirtles-code authored Nov 4, 2023
1 parent a850786 commit 2cc0acc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/guide/extending-default-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ import DefaultTheme from 'vitepress/theme'
import MyLayout from './MyLayout.vue'

export default {
...DefaultTheme,
extends: DefaultTheme,
// override the Layout with a wrapper component that
// injects the slots
Layout: MyLayout
Expand Down Expand Up @@ -168,7 +168,7 @@ import DefaultTheme from 'vitepress/theme'
import MyComponent from './MyComponent.vue'

export default {
...DefaultTheme,
extends: DefaultTheme,
Layout() {
return h(DefaultTheme.Layout, null, {
'aside-outline-before': () => h(MyComponent)
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ However, VitePress won't redirect `/` to `/en/` by default. You'll need to confi
import DefaultTheme from 'vitepress/theme'

export default {
...DefaultTheme,
extends: DefaultTheme,
setup() {
const { lang } = useData()
watchEffect(() => {
Expand Down

0 comments on commit 2cc0acc

Please sign in to comment.