It requires simpler modifications than I thought. Pretty interesting.
It is not going to work especially that it will be relative for all pages so I guess `relref` would work (unfortunately looking like a hack but whatever).