Fortran-FOSS-Programmers / ford

Automatically generates FORtran Documentation from comments within the code.

Home Page:https://forddocs.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Broken links in description on lists pages

amorison opened this issue · comments

Some parts of the documentation appear in several locations, notably in descriptions columns of list pages. It seems however that relative links are only built with respect to one location, resulting in potentially broken links. The following minimal example reproduces the issue: ford_rel_link_bug.zip

Subroutines hello_a and hello_b both have a link to the other in their documentation. These links are correct in their own documentation page, e.g. /proc/hello_a.html links tohello_b.html which resolves to /proc/hello_b.html. But on the page listing procedures /lists/procedures.html, the link in the "description" column is also to hello_b.html instead of ../proc/hello_b.html and therefore incorrectly points to /lists/hello_b.html which doesn't exist.

Similar issues arise when e.g. two types refer to one another in their description, and any part of the documentation that can appear in more than one place is potentially affected by this issue.

This was because the entity summary is reused as-is between the main entity page and the list pages, so we actually need to make a relative link that works on both. Luckily both pages are the same level of nesting in the directory structure so this wasn't too difficult. I'm pretty sure the summary doesn't appear on any other page, so this should hopefully be ok!