zernonia / vue3-notion

An unofficial Notion renderer (Vue 3) version
https://vue3-notion.vercel.app/
MIT License
134 stars 20 forks source link

Redirect to a custom path #42

Open GugaAraujo opened 10 months ago

GugaAraujo commented 10 months ago

I would like to direct the links contained in a page notion to a custom path in my vue application. In a similar way to what happens on the page:

https://vue3-notion.vercel.app/page/de51eee9-6dc3-4698-8484-94e04c0ec2fe

Currently, when I click on a link in the content, I am redirected to my app's route concatenated to the page ID. I need an example of how I can configure this, or if I can get an event to work this dynamic.

example: https://root.com/cusom-path/notionId

Does anyone know a solution?

BeanWei commented 10 months ago

You can setup the mapPageUrl config, see https://github.com/zernonia/vue3-notion/blob/HEAD/demo/nuxt/composables/useProps.ts