-
At the end of each page, I want to link all other pages (except the current one). I made an
This works fine and when I am on page 1, it only displays pages 2+3. But clicking on page 2 does not reload the component and pages 2+3 are still displayed at the end of page 2 (instead of pages 1+3). Is there a way to make the component reload upon page change (shouldn't it be reloaded by default if it is in the doc-bottom slot?), or to make the component aware of when the path changes? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Use Something like this might work: const { page } = useData()
const currentPagePath = computed(() => page.value.relativePath.replace('.md', '')) |
Beta Was this translation helpful? Give feedback.
-
Works, thanks! |
Beta Was this translation helpful? Give feedback.
Use
computed
(https://vuejs.org/guide/essentials/computed.html)Something like this might work: