1.1.8 • Published 2 years ago

cp-metas v1.1.8

Weekly downloads
-
License
ISC
Repository
-
Last release
2 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

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago