How to generate full doc files of a project?

I tried using doc_save(., []), but it does not generate separate pages for predicates, while still generating the respective hrefs in index.html.

Suppose I have a prolog file test.pl I want to have a documentation for,

%! win is det.
%
% win is always true.
win.

%! зрада is det.
%
% зрада завжди заврешується невдачею.
зрада :- !, fail.

I run swipl -g '[test], doc_save(., []), halt.' which generates a bunch of files in doc/, including index.html and test.html. The problem is that it does not contain separate files describing each predicate. That is despite the fact that we have, in index.html,

<tr class="public"><td><a href="/pldoc/doc_for?object=win/0">win/0</a></td><td class="summary">win is always true.</td><td align="right"><span style="white-space: nowrap"></span></td></tr>

refering to a URL "/pldoc/doc_for?object=win/0" which is normally created by JavaScript making additional requests to the server, as far as I understand.

My temporary solution is to make all links starting with /pldoc/doc_for to have the class extmanual,

user@machine doc> for i in *.html; do sed 's/a href=\"\/pldoc\/doc_for/a class=\"extmanual\" href=\"pldoc\/doc_for/g' $i > $i.1; mv $i.1 $i; done

while disabling the hyperlink function and appearance for a.extmanual in pldoc.css with

a.extmanual { pointer-events: none; text-decoration: none }

This way anyone viewing the doc won’t get disappointed by the 404 messages. But of course, now you can’t just click on the predicate name right after opening the documentation starting page.