{"action":"created","issue":{"url":"https://api.github.com/repos/declandewet/vue-meta/issues/12","repository_url":"https://api.github.com/repos/declandewet/vue-meta","labels_url":"https://api.github.com/repos/declandewet/vue-meta/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/declandewet/vue-meta/issues/12/comments","events_url":"https://api.github.com/repos/declandewet/vue-meta/issues/12/events","html_url":"https://github.com/declandewet/vue-meta/issues/12","id":187968140,"number":12,"title":"Adding options `keyName`","user":{"login":"Atinux","id":904724,"avatar_url":"https://avatars.githubusercontent.com/u/904724?v=3","gravatar_id":"","url":"https://api.github.com/users/Atinux","html_url":"https://github.com/Atinux","followers_url":"https://api.github.com/users/Atinux/followers","following_url":"https://api.github.com/users/Atinux/following{/other_user}","gists_url":"https://api.github.com/users/Atinux/gists{/gist_id}","starred_url":"https://api.github.com/users/Atinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Atinux/subscriptions","organizations_url":"https://api.github.com/users/Atinux/orgs","repos_url":"https://api.github.com/users/Atinux/repos","events_url":"https://api.github.com/users/Atinux/events{/privacy}","received_events_url":"https://api.github.com/users/Atinux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-11-08T11:29:57Z","updated_at":"2016-11-09T12:46:08Z","closed_at":null,"body":"Hi!\r\n\r\nI think it could be great to set the keyName as an option when installing `vue-meta`:\r\n\r\n```js\r\nimport Meta from 'vue-meta'\r\n\r\nvar options = {\r\n  keyName: 'head'\r\n}\r\nVue.use(Meta, options)\r\n```\r\n\r\nSo then, in my components, I can do:\r\n```html\r\n<script>\r\n  export default {\r\n    head: {\r\n      title: 'My Example App',\r\n      htmlAttrs: { lang: 'en' }\r\n    }\r\n  }\r\n</script>\r\n```\r\n\r\nI want to implement it in nuxt.js as similar as in next.js, the component name is <Head>, so a key `head` seems the best name to making it similar (even if vue-meta can update more than inside the <head>, which rocks 🚀 )\r\n\r\nI you like the idea, I can try to make a pull request?"},"comment":{"url":"https://api.github.com/repos/declandewet/vue-meta/issues/comments/259406642","html_url":"https://github.com/declandewet/vue-meta/issues/12#issuecomment-259406642","issue_url":"https://api.github.com/repos/declandewet/vue-meta/issues/12","id":259406642,"user":{"login":"Atinux","id":904724,"avatar_url":"https://avatars.githubusercontent.com/u/904724?v=3","gravatar_id":"","url":"https://api.github.com/users/Atinux","html_url":"https://github.com/Atinux","followers_url":"https://api.github.com/users/Atinux/followers","following_url":"https://api.github.com/users/Atinux/following{/other_user}","gists_url":"https://api.github.com/users/Atinux/gists{/gist_id}","starred_url":"https://api.github.com/users/Atinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Atinux/subscriptions","organizations_url":"https://api.github.com/users/Atinux/orgs","repos_url":"https://api.github.com/users/Atinux/repos","events_url":"https://api.github.com/users/Atinux/events{/privacy}","received_events_url":"https://api.github.com/users/Atinux/received_events","type":"User","site_admin":false},"created_at":"2016-11-09T12:46:08Z","updated_at":"2016-11-09T12:46:08Z","body":"And before implementing it, it should use the keyName instead of the `metaInfo` property:\r\n```js\r\nif (typeof this.$options[options.keyName] === 'function') {\r\n  this.$options.computed.$metaInfo = this.$options[options.keyName];\r\n}\r\n```\r\n\r\nIf I got some time, I will PR with pleasure!"}}
{"actor":{"display_login":"Atinux"}}