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

bug: forge doc should only generate relative links #8576

Open
2 tasks done
guidanoli opened this issue Jul 31, 2024 · 3 comments · May be fixed by #8641
Open
2 tasks done

bug: forge doc should only generate relative links #8576

guidanoli opened this issue Jul 31, 2024 · 3 comments · May be fixed by #8641
Assignees
Labels
Cmd-forge-doc Command: forge doc good first issue Good for newcomers P-low Priority: low T-bug Type: bug
Milestone

Comments

@guidanoli
Copy link

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (26a7559 2024-07-31T00:18:10.296782444Z)

What command(s) is the bug in?

forge doc

Operating System

Linux

Describe the bug

Some links generated by forge doc are relative (like ../../../foo), and some are absolute (like /contracts/foo). When hosting documentation generated by forge doc on GitHub pages, the root is something like <user>.github.io/<repo>, and absolute links don't work because they don't have the <repo> part. Relative links works normally.

Steps to reproduce:

  • Clone cartesi/rollups-contracts
  • Run pnpm i to install all Node.js packages
  • Run forge doc -b to build documentation pages
  • Run grep -l '<a href="/' -r docs and you'll see there will be several pages with absolute links:
docs/book/contracts/dapp/SelfHostedApplicationFactory.sol/contract.SelfHostedApplicationFactory.html
docs/book/contracts/dapp/Application.sol/contract.Application.html
docs/book/contracts/dapp/ApplicationFactory.sol/contract.ApplicationFactory.html
docs/book/contracts/inputs/InputBox.sol/contract.InputBox.html
docs/book/contracts/consensus/authority/Authority.sol/contract.Authority.html
docs/book/contracts/consensus/authority/AuthorityFactory.sol/contract.AuthorityFactory.html
docs/book/contracts/consensus/AbstractConsensus.sol/abstract.AbstractConsensus.html
docs/book/contracts/consensus/index.html
docs/book/contracts/consensus/quorum/QuorumFactory.sol/contract.QuorumFactory.html
docs/book/contracts/consensus/quorum/Quorum.sol/contract.Quorum.html
docs/book/contracts/portals/Portal.sol/contract.Portal.html
docs/book/contracts/portals/IERC1155SinglePortal.sol/interface.IERC1155SinglePortal.html
docs/book/contracts/portals/ERC721Portal.sol/contract.ERC721Portal.html
docs/book/contracts/portals/IEtherPortal.sol/interface.IEtherPortal.html
docs/book/contracts/portals/IERC20Portal.sol/interface.IERC20Portal.html
docs/book/contracts/portals/ERC1155BatchPortal.sol/contract.ERC1155BatchPortal.html
docs/book/contracts/portals/IERC1155BatchPortal.sol/interface.IERC1155BatchPortal.html
docs/book/contracts/portals/ERC1155SinglePortal.sol/contract.ERC1155SinglePortal.html
docs/book/contracts/portals/IERC721Portal.sol/interface.IERC721Portal.html
docs/book/contracts/portals/EtherPortal.sol/contract.EtherPortal.html
docs/book/contracts/portals/ERC20Portal.sol/contract.ERC20Portal.html
@guidanoli guidanoli added the T-bug Type: bug label Jul 31, 2024
@zerosnacks zerosnacks added the Cmd-forge-doc Command: forge doc label Jul 31, 2024
@zerosnacks zerosnacks changed the title Make forge doc generate only relative links bug: make forge doc should only generate relative links Jul 31, 2024
@zerosnacks zerosnacks added this to the v1.0.0 milestone Jul 31, 2024
@zerosnacks zerosnacks added the good first issue Good for newcomers label Jul 31, 2024
@glazec
Copy link

glazec commented Aug 2, 2024

I will work on this

@guidanoli guidanoli changed the title bug: make forge doc should only generate relative links bug: forge doc should only generate relative links Aug 5, 2024
@ShivamBisen
Copy link

can i work on this

@glazec
Copy link

glazec commented Sep 11, 2024

The fix is implemented. Still, wait for anyone to approve the PR.

@grandizzy grandizzy added the P-low Priority: low label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cmd-forge-doc Command: forge doc good first issue Good for newcomers P-low Priority: low T-bug Type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants