p4c icon indicating copy to clipboard operation
p4c copied to clipboard

Broken link to Migration guide in doxygen-generated docs

Open jafingerhut opened this issue 1 year ago • 2 comments

Go to this page: https://p4lang.github.io/p4c/md_01__overview.html

In the last bullet item there is a link "migration guide". When I click on it as of 2024-Jun-24, I get a 404 error page from the server.

The link appears to be a correct Github-flavored Markdown link in the docs/README.md file, so ideally there should be a way to leave the link in the file docs/README.md as it is now, but change how doxygen processes the link when generating HTML.

This is not necessarily the most critical issue to fix in the documentation, but I wanted to record it.

jafingerhut avatar Jun 24 '24 04:06 jafingerhut

There are some more broken links on the P4Smith page, in particular the ones with the link text listed below:

  • targets/generic
  • targets/bmv2
  • targets/pna
  • targets/ebpf

It looks like several of those are correct Github-flavored Markdown links to files within the p4lang/p4c repository, but they are not being translated into corresponding links by doxygen in the HTML.

jafingerhut avatar Jun 24 '24 05:06 jafingerhut

I searched for workarounds, but the best way I could find was to use direct link to PPT . i.e. [Migration Guide](https://github.com/p4lang/p4c/blob/main/docs/migration-guide.pptx)

Context

  • There is an option to copy the files to the root of the generated HTML, but it still breaks the link, as our HTML and PPT are on the same level. [Reason - Current link is not pointing to same level.]

We can fix this by pushing the generated HTML to a docs Dir and then copying all resource files to root. Note : That this can only fix file links which are one dir level above. i.e. Not very flexible.

AdarshRawat1 avatar Jun 24 '24 17:06 AdarshRawat1

  • Fixed in #4793

AdarshRawat1 avatar Jul 20 '24 07:07 AdarshRawat1

All of the links reported in my original issue are working reasonably now in the version generated and published here https://p4lang.github.io/p4c/index.html after this PR was merged in: https://github.com/p4lang/p4c/pull/4793

Thus, closing this issue. I will create a separate issue for some other links I added in a follow-up comment, that are still currently broken.

jafingerhut avatar Jul 21 '24 19:07 jafingerhut