Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong absolute link in doc generated markdown #8600

Closed
wants to merge 2 commits into from

Conversation

glazec
Copy link

@glazec glazec commented Aug 5, 2024

Motivation

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

Solution

There are two parts using the wrong absolute link

  • inheritance part
  • summary page link for folders( if the contract is inside a subfolder of contract src page, like contracts/consensus/authority/

Screenshot 2024-08-04 at 22 52 01

Screenshot 2024-08-04 at 22 51 27

For the inheritance page, we changed how the inheritance contract is processed and stored the relevant path( like docs/src/contracts/portals/IERC20Portal.sol/interface.IERC20Portal.md). We assemble the final link in the as_doc where inheritance is processed. We concatenate the link (like /Users/glaze/developer/foundry/rollups-contracts/docs/docs/src/contracts/inputs/IInputBox.sol/interface.IInputBox.md) and clean it up and output the correct link (like file:///Users/glaze/developer/foundry/rollups-contracts/docs/book/contracts/portals/IPortal.sol/interface.IPortal.html.)

@glazec glazec closed this Aug 5, 2024
@guidanoli
Copy link

@glazec why did you close the PR?

@glazec
Copy link
Author

glazec commented Aug 9, 2024

There are some bugs in the PR. I am working on that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants