Skip to content

Instantly share code, notes, and snippets.

@eperedo
Created August 23, 2017 19:57
Show Gist options
  • Save eperedo/ff9f95496edbbe1b36d845eb07236e4d to your computer and use it in GitHub Desktop.
Save eperedo/ff9f95496edbbe1b36d845eb07236e4d to your computer and use it in GitHub Desktop.
meta tags in single page application
<template>
<div>
About Page {{message}}
</div>
</template>
<script>
function metaInfo() {
return {
title: 'About Title',
titleTemplate: '%s | My Awesome Webapp',
meta: [
{ name: 'description', content: 'About Page', vmid: 'test' },
{ name: 'og:title', content: 'Title for Facebook', vmid: 'title for facebook' },
],
};
}
function data() {
return {
message: 'About Message',
};
}
export default {
name: 'about',
data,
metaInfo,
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment