1.0.1 • Published 11 months ago

vue-custom-head v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

Introduction

This package is used to custom <head> in each Vue's components and was inspired by react-helmet. Of course you can use it as a plugin or a component.

Usage:

  • As a Component (Local Component)
<script>
import VueHelmet from 'vue-custom-head';
export default {
  name: 'ExampleComponent',
  components: {
    VueHelmet
  }
}
</script>

<template>
  <VueHelmet>
    <title>Example Title</title>
    <meta name="description" content="Hallo, Ich bin Toni">
  </VueHelmet>

  <p>Hello World</p>
</template>
  • As a Plugin (Global Environment)
/** In file main.js (version 3) */
import { VueProvider } from 'vue-custom-head'
import { createApp } from 'vue'

let app = createApp()
app.use(VueProvider)
app.mount("#app")

//===================================================

/** In file main.js (version 2) */
import { VueProvider } from 'vue-custom-head'
import Vue from 'vue'

Vue.use(VueProvider)
let app = new Vue()
app.mount("#app")

Hope you like this package and i'm very happy when this package can help you.

1.0.1

11 months ago

1.0.0

11 months ago