Setup
Using Vue? Check out the Vue integration for gomputed getter and ref support.
Install
yarn
yarn add unhead
If your app has SSR, you may also want the SSR package:
yarn
yarn add @unhead/ssr
Setup
1. Create your head
Start by creating a head instance somewhere in your apps entry.
main.ts
import { createHead } from "unhead"// Create a global head instanceconst head = createHead()
2. Use the useHead
composable
Test it's working by adding useHead
somewhere in your application.
import { useHead } from 'unhead'useHead({ title: 'My awesome site'})
Next Steps
Your app is now setup for head management, congrats! 🎉
Try next:
- Optional: Setup SSR
- Optional: Setup Auto Imports
- Add some recipes