ocaml.org
ocaml.org copied to clipboard
404 Error on 'Doc Examples' Link in Cmarkit Section
This issue pertains to a broken link in the cmarkit section of the application or website. When users click on the "doc examples" link, instead of navigating to the intended resource or page, it results in a 404 error. This indicates that the linked page is either missing, has been moved, or the URL is incorrect. The problem affects user experience by preventing access to the expected documentation or examples.
CC @cuihtlauac @sabine
This indicates that the linked page is either missing, has been moved, or the URL is incorrect
For some reason, the Github README is not correctly parsed. The package description page in ocaml.org is just a view from the project's README. All links were working when I tried using Github directly.
It is redirecting to https://ocaml.org/p/cmarkit/test/bench.ml instead of https://github.com/dbuenzli/cmarkit/blob/main/test/bench.ml
I'll try to debug it
Hello @vit0rr ! Could you please elaborate how did you accessed the links directly from Github?
Hello @vit0rr ! Could you please elaborate how did you accessed the links directly from Github?
You can just access the project's Github page: https://github.com/dbuenzli/cmarkit
For some reason, the Github README is not correctly parsed. The package description page in ocaml.org is just a view from the project's README. All links were working when I tried using Github directly.
ocaml.org copies README from their project's home page in GitHub.
When files include relative links, they are not resolved correctly once displayed in ocaml.org. For instance, here is cmarkit's README source:
## Sample programs
The [`cmarkit`] tool parses and renders CommonMark files in various
ways.
See also [`bench.ml`] and the [doc examples].
[`cmarkit`]: test/cmarkit_tool.ml
[`bench.ml`]: test/bench.ml
[doc examples]: test/examples.ml
GitHub translates test.bench.ml into
https://github.com/dbuenzli/cmarkit/blob/main/test/bench.ml
To fix the broken link, we'd need to processing in ocaml.org to restore the complete link to GiutHub.