refactor: rename $theme to $themeConfig to align the naming with vuepress

pull/152/head
Matias Capeletto 5 years ago
parent f27addcab1
commit 07e06257e9

@ -19,7 +19,7 @@ title: Docs with VitePress
editLink: true editLink: true
--- ---
# {{ $page.frontmatter.title }} # {{ $frontmatter.title }}
Guide content Guide content
``` ```

@ -14,7 +14,7 @@ This is the `$site` value of the site youre currently reading:
"locales": {}, "locales": {},
"base": "/", "base": "/",
"head": [], "head": [],
"themeConfig: $theme "themeConfig: $themeConfig
} }
``` ```
@ -55,7 +55,7 @@ Reference of [\$page](#page).frontmatter.
} }
``` ```
## \$theme ## \$themeConfig
Refers to `$site.themeConfig`. Refers to `$site.themeConfig`.

@ -92,7 +92,7 @@ export function createApp() {
return router.route.data.frontmatter return router.route.data.frontmatter
} }
}, },
$theme: { $themeConfig: {
get() { get() {
return siteDataByRouteRef.value.themeConfig return siteDataByRouteRef.value.themeConfig
} }

@ -5,9 +5,9 @@
:aria-label="`${$site.title}, back to home`" :aria-label="`${$site.title}, back to home`"
> >
<img <img
v-if="$theme.logo" v-if="$themeConfig.logo"
class="logo" class="logo"
:src="withBase($theme.logo)" :src="withBase($themeConfig.logo)"
alt="Logo" alt="Logo"
/> />
{{ $site.title }} {{ $site.title }}
@ -37,7 +37,7 @@ export default defineComponent({
} }
.logo { .logo {
margin-right: .75rem; margin-right: 0.75rem;
height: 1.3rem; height: 1.3rem;
vertical-align: bottom; vertical-align: bottom;
} }

Loading…
Cancel
Save