How to make pagedjs cross reference work in vitepress?

58 Views Asked by At

I referenced the pagedjs doc: https://pagedjs.org/documentation/-cross-references/, it says that cross reference can be made by css's target-text. However when I tried it in vitepress, it doesn't work.

The css has already applied to the link, however, the text wasn't show up.

Reproduce: https://stackblitz.com/edit/vite-6c5kno?file=docs%2Fcross-ref.md

enter image description here

enter image description here

The target-text part was replaced by var(--pagedjs-088b62c0-38d2-499f-bf12-e82792a64fd8).

1

There are 1 best solutions below

0
On

Fixed by adding a #. I was misled by this part:

enter image description here