1.1.8 • Published 3 years ago

cp-metas v1.1.8

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

cp-metas

Installing

Using npm:

$ npm install cp-metas --save

Usage

Register the Vue plugin:

import {createApp} from "vue";
import createMeta from "cp-metas";

const defaultOptions = {
    ...
}
const app = createApp()
const meta = createMeta(defaultOptions, isSSR, isPrivate)
app.use(meta, {mixin: false})

app.mount('#app')

Manage meta with the composition API cpMeta in your component:

<script>
import {defineComponent} from 'vue'
import {cpMeta} from 'cp-metas'

export default defineComponent({
  mixins: [cpMeta],
  head() {
    return {
      title: 'hello world!',
      ...
    }
  }
})
</script>

###Server-side rendering

import {usMeta} from 'cp-metas'
usMeta({
    title: 'hello world!',
    ...
})
1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago