Using a simple link to another page in my site

In my slice it's quite easy to refer to an image or rich text field.

I had expected that links should be the same:

<prismic-link :field="fields.myLink">
      Click here
    </prismic-link>

But it's not working in the same way as the others above and the documentation is a little confusing to follow as to exactly what is required.

The nuxt templating docs, discuss approaches relevant more to Vue and the need to create link resolver, but I thought nuxts opionated folder based routing should be helping with this.

I did work out a solution/workaround today, which is to hand roll a link with the nuxt-link.
In this case Internal Link is the name I've given to my link.

<nuxt-link :to="`/${item.internal_link.type}/${item.internal_link.uri}`">Click Me</nuxt-link>

Wondering why the equivilent doesnt just work out of the box but this should help anyone else looking for how to get links working with Prismic & Nuxt.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.