Templating the UID field
The UID field is a unique identifier that can be used specifically to create SEO and user-friendly website URLs.
Before Reading
This page assumes that you have already included the @prismicio/vue plugin in your project or that you are using the Prismic Vue.js starter. Check out the Integrating with existing project page to learn how to get setup.
Copy
const uid = document.uid;
Vue Router: Reacting to params changes
If your component is retrieving content from the Prismic API based on one of the route params, make sure to take a look at our Reacting to params changes page.