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

Link to "canceable" broken #867

Open
arvidj opened this issue Jun 3, 2021 · 5 comments
Open

Link to "canceable" broken #867

arvidj opened this issue Jun 3, 2021 · 5 comments

Comments

@arvidj
Copy link

arvidj commented Jun 3, 2021

On https://ocsigen.org/lwt/latest/api/Lwt#2_Cancellation there is a link to https://ocsigen.org/#VALcancel . This link is broken.

@raphael-proust
Copy link
Collaborator

Thanks for the report. There are other broken links (e.g., let%lwt is a link to https://ocsigen.org/#VALbind which is broken in the same way).

It should point to https://ocsigen.org/lwt/latest/api/Lwt#VALcancel (and similarly https://ocsigen.org/lwt/latest/api/Lwt#VALbind).


The doc generation in this project is somewhat convoluted so I'm putting this aside for now and I'll come back to this issue later.

@arvidj arvidj changed the title Link to "canceable Link to "canceable" broken Nov 1, 2024
@arvidj
Copy link
Author

arvidj commented Nov 1, 2024

I had a look at this. As you suggest, it wasn't as easy as one would expect. The issue is that the HTML contains links like
<a href=" /#VALcancel" class="ocsimore_phrasing_link"> cancelable</a>
Note that the href is /#... i.e. it starts with a spurious space and slash. It seems this is the part to remove to make the link valid. On the documentation comment level, this seems to come from links on the form {{!Lwt.cancel} cancelable}, i.e. where the link text for a reference is customized. I couldn't figure out from where this comes since I couldn't actually figure out how the documentation published at https://ocsigen.org/lwt/latest/api/Lwt is generated. If I build the documentation locally, using either dune build @doc or make doc-api-html, then I do not have this issue. I think the issue is somewhere in wikidoc.

@arvidj
Copy link
Author

arvidj commented Nov 1, 2024

The issue seems to be in the generated .wiki files iiuc:
https://github.com/ocsigen/lwt/blob/wikidoc/docs/5.5.0/api/Lwt.wiki?plain=1#L1227 has

[[ #VALcancel| cancelable]]~.

@arvidj
Copy link
Author

arvidj commented Nov 1, 2024

However, when I regenerate the wiki files locally, I do not get the same markup. Instead, I get:

<<a_api text=" cancelable" | val Lwt.cancel >>~.

which is perhaps the correct syntax? So the issue may be an old wikidoc version?

@arvidj
Copy link
Author

arvidj commented Nov 1, 2024

Aha! I noticed that this has actually already been fixed in #928. The reason that we see it on https://ocsigen.org/lwt/latest/api/Lwt is the most recently published documentation is for 5.5.0, and the fix is in 5.6.0. So the easy fix should be to publish the documentation for 5.6.0 and 5.7.0.

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

No branches or pull requests

2 participants