foundry icon indicating copy to clipboard operation
foundry copied to clipboard

Change absolute link to relative link during doc generation

Open glazec opened this issue 6 months ago • 2 comments

Motivation

Closes #8576 This issue found a link problem in forge doc generated website. Some link uses the absolute link like /contracts/foo which is an invalid URL.

Solution

There are two parts using the wrong absolute link

  • inheritance part: change "/contracts/foo" to "../../../contracts/foo"
  • readme page link for folders( if the contract is inside a subfolder of contract src page, like contracts/consensus/authority/): delete the beginning "/", add some "../", add index.html at the end. image image

I tested this PR on cartesi/rollups-contracts. You can view the doc website

glazec avatar Aug 09 '24 22:08 glazec