Raku / Documentable

Documentation API: caching, parsing, indexing and generating documentation
https://docs.raku.org
Artistic License 2.0
11 stars 13 forks source link

broken links in individual routine pages if the links are just fragment-urls in the pod document #157

Open k3ut0i opened 3 years ago

k3ut0i commented 3 years ago

Description

subroutine pages on docs.raku.org/routine/ path might have broken links if they are just fragment links(i.e., #someindex) in the original pod6 document. They are accurate within that document but will fail for the separate routine pages.

So for the link in the routine page to be broken: The description of the sub must refer to another section within the document using L<some desc|#someindex>

Examples

Consider this page: https://docs.raku.org/routine/srand . In the description there is a link to Num.rand which should have been https://docs.raku.org/type/Num#method_rand . But it is https://docs.raku.org/routine/srand#method_rand.

This happened because in the original Num.pod6 the reference was L<Num.rand|#method_rand> which translated as it is in a separate page for the routine, gives us a link that takes us nowhere.

Some other cases that I found are in subroutines: shell append plan is skip-rest bail-out.

Solutions

  1. Very few cases so we can manually edit them.
  2. When generating routine pages, if the link is a section redirect, then we can translate it to a full link.