From: Andy Li <63885381+tutorialcode@users.noreply.github.com> Date: Wed, 26 Oct 2022 12:30:43 +0000 (-0400) Subject: docs: Vue Mastery links for pinia cheat sheet (#1718) X-Git-Tag: @pinia/nuxt@0.4.4~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f7594721fd543be1a001bdc6c9a28554a47cdc5;p=thirdparty%2Fvuejs%2Fpinia.git docs: Vue Mastery links for pinia cheat sheet (#1718) Co-authored-by: Andy --- diff --git a/packages/docs/.vitepress/components/VueMasteryHomeLink.vue b/packages/docs/.vitepress/components/VueMasteryHomeLink.vue new file mode 100644 index 00000000..6bde6b7c --- /dev/null +++ b/packages/docs/.vitepress/components/VueMasteryHomeLink.vue @@ -0,0 +1,63 @@ + + + + + + \ No newline at end of file diff --git a/packages/docs/.vitepress/components/VueMasteryLogoLink.vue b/packages/docs/.vitepress/components/VueMasteryLogoLink.vue new file mode 100644 index 00000000..0589d3f8 --- /dev/null +++ b/packages/docs/.vitepress/components/VueMasteryLogoLink.vue @@ -0,0 +1,77 @@ + + + + + \ No newline at end of file diff --git a/packages/docs/.vitepress/theme/Layout.ts b/packages/docs/.vitepress/theme/Layout.ts index 4a464910..a6cfb3fc 100644 --- a/packages/docs/.vitepress/theme/Layout.ts +++ b/packages/docs/.vitepress/theme/Layout.ts @@ -5,6 +5,7 @@ import './sponsors.css' import { darkStorageConfig } from '../theme/dark-theme' import { useDark } from '@vueuse/core' import BannerTop from '../components/BannerTop.vue' +import VueMasteryHomeLink from '../components/VueMasteryHomeLink.vue' import './banner-top.css' export const Layout = defineComponent({ @@ -38,6 +39,7 @@ export const Layout = defineComponent({ ), ] ), + h(VueMasteryHomeLink), ]), 'page-top': () => h(BannerTop), 'sidebar-top': () => diff --git a/packages/docs/.vitepress/theme/index.js b/packages/docs/.vitepress/theme/index.js index e8749981..671420ac 100644 --- a/packages/docs/.vitepress/theme/index.js +++ b/packages/docs/.vitepress/theme/index.js @@ -1,5 +1,6 @@ import Theme from 'vitepress/theme' import VueSchoolLink from '../components/VueSchoolLink.vue' +import VueMasteryLogoLink from '../components/VueMasteryLogoLink.vue' import { Layout } from './Layout' import './custom.css' import './code-theme.css' @@ -14,6 +15,7 @@ const config = { enhanceApp({ app }) { // app.use(createPinia()) app.component('VueSchoolLink', VueSchoolLink) + app.component('VueMasteryLogoLink', VueMasteryLogoLink) }, } diff --git a/packages/docs/getting-started.md b/packages/docs/getting-started.md index 7eb0d960..a7031401 100644 --- a/packages/docs/getting-started.md +++ b/packages/docs/getting-started.md @@ -1,5 +1,8 @@ ## Installation + + + Install `pinia` with your favorite package manager: ```bash diff --git a/packages/docs/introduction.md b/packages/docs/introduction.md index e0483b3b..b22ac85f 100644 --- a/packages/docs/introduction.md +++ b/packages/docs/introduction.md @@ -22,6 +22,9 @@ Pinia is a store library for Vue, it allows you to share a state across componen - Proper TypeScript support or **autocompletion** for JS users - Server Side Rendering Support + + + ## Basic example This is what using Pinia looks like in terms of API (make sure to check the [Getting Started](./getting-started.md) for complete instructions). You start by creating a store: