From bf54ded9bf2b16dc1ffb64d85136ed05f87ec23c Mon Sep 17 00:00:00 2001 From: Declan de Wet Date: Thu, 10 Nov 2016 20:11:59 +0200 Subject: [PATCH] document options --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 4f8c2dd..73b1f90 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,7 @@ - [CDN](#cdn) - [Usage](#usage) - [Step 1: Preparing the plugin](#step-1-preparing-the-plugin) + - [Options](#options) - [Step 2: Server Rendering (Optional)](#step-2-server-rendering-optional) - [Step 2.1: Exposing `$meta` to `bundleRenderer`](#step-21-exposing-meta-to-bundlerenderer) - [Step 2.2: Populating the document meta info with `inject()`](#step-22-populating-the-document-meta-info-with-inject) @@ -140,6 +141,19 @@ export default new Router({ }) ``` +#### Options + +`vue-meta` allows a few custom options: + +```js +Vue.use(Meta, { + keyName: 'metaInfo', // the component option name that vue-meta looks for meta info on. + attribute: 'data-vue-meta', // the attribute name vue-meta adds to the tags it observes + ssrAttribute: 'data-vue-meta-server-rendered', // the attribute name that lets vue-meta know that meta info has already been server-rendered + tagIDKeyName: 'vmid' // the property name that vue-meta uses to determine whether to overwrite or append a tag +}) +``` + If you don't care about server-side rendering, you can skip straight to [step 3](#step-3-start-defining-metainfo). Otherwise, continue. :smile: ## Step 2: Server Rendering (Optional)