Closed amorison closed 8 months ago
Oh dear, I thought I had tried to make it not do that! Will investigate
After running a couple of local tests, it seems link resolution is broken in various ways on Ford 7.0.2. Link to Fortran entities (programs, types, etc) from/to static pages resolve to the wrong location. For example (locally serving the generated documentation on port 8080
):
http://[::]:8080/page/user/physics/diff_visc.html
, I have a link to a type [[nml_physics_t]]
that is resolved to http://[::]:8080/page/user/physics/type/nml_physics_t.html
(notice the extraneous /page/user/physics
path segment).http://[::]:8080/type/nml_physics_t.html
, I have a link [see dedicated page](|page|/user/physics/diff_visc.html)
that is resolved to http://[::]:8080/absolute/path/to/doc/output/dir/page/user/physics/diff_visc.html
.Thanks for looking into this @amorison. Would you be able to wrap that up into a minimal self-contained example please? I'm afraid I don't have a great deal of time to spend on Ford at the moment, so this would help me out a lot!
Here is an example that reproduces the issue. Call ford docs.md
from the doc
subfolder to generate the documentation. Notice how the links from/to static pages are either broken, or absolute instead of relative (which is more apparent when browsing the documentation served with a web browser).
When
project_url
is left blank, internal links should be relative to make it possible to serve the generated documentation with a web server. In particular, this means|page|
,|media|
,|url|
should be relative links instead of absolute paths. PR #562 fixed the problem that|page|
and|media|
would expand to the wrong relative paths in nested pages, but in doing so made those links fully absolute and resolved instead of relative.