diff --git a/docs/src/.vuepress/config.js b/docs/src/.vuepress/config.js index 416a905..48048d0 100755 --- a/docs/src/.vuepress/config.js +++ b/docs/src/.vuepress/config.js @@ -1,36 +1,17 @@ const { description } = require('../../package.json') module.exports = { - /** - * Ref:https://v1.vuepress.vuejs.org/config/#title - */ title: 'Vue 3 Google maps', - /** - * Ref:https://v1.vuepress.vuejs.org/config/#description - */ description: description, base: '/', - /** - * Extra tags to be injected to the page HTML `
` - * - * ref:https://v1.vuepress.vuejs.org/config/#head - */ head: [ ['meta', { name: 'theme-color', content: '#000' }], - ['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }], - ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }] ], - - /** - * Theme configuration, here is the default theme configuration for VuePress. - * - * ref:https://v1.vuepress.vuejs.org/theme/default-theme-config.html - */ themeConfig: { - repo: '', + repo: 'fawmi/vue-google-maps', editLinks: false, - docsDir: '', - editLinkText: '', + docsDir: 'docs', + editLinkText: 'Edit on github', lastUpdated: false, logo: '/assets/logo.jpg', nav: [ diff --git a/docs/src/index.md b/docs/src/index.md index 78d2c9a..e392d27 100755 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,19 +1,74 @@ --- home: true heroImage: 'assets/logo.jpg' -tagline: Google maps components for Vue.js -actionText: Quick Start → +tagline: Vue 3 Google maps components +actionText: Read Docs → actionLink: /docs/ -features: -- title: Lots of utilities - details: Center markers, add Cluster, add custom buttons, and a lot more with just props -- title: Supports most maps components - details: Most common Google map Components are implemented and are reactive out of box. -- title: Well documented - details: All the components come with documentations and examples, making it extremely easy to use. -- title: Well maintained - details: We heavily rely on this library in workplace. So this library is actively developed and improved. -- title: Well tested - details: The library is used in production in many apps and comes with automated test, more automated test is coming. -footer: Made by Fawad Mirzad with ❤️ --- + + +## Installation +You can install it using npm +``` +npm install -S @fawmi/vue-google-maps +``` + +## Basic usage +You need an API Key. Learn how to [get an Api key ](https://developers.google.com/maps/documentation/javascript/get-api-key). + +### Configure Vue to use the Components + +In your `main.js` or inside a Nuxt plugin: + +```js +import { createApp } from 'vue' +import * as VueGoogleMaps from '@fawmi/vue-google-maps' + +const app = createApp(App); +app.use(VueGoogleMaps, { + load: { + key: 'YOUR_API_KEY_COMES_HERE', + }, +}).mount('#app') + +``` +### Use it anywhere in your components +```vue + +