# How to generate full doc files of a project?

**URL:** https://swi-prolog.discourse.group/t/how-to-generate-full-doc-files-of-a-project/9831
**Category:** PlDoc
**Tags:** bug, pldoc
**Created:** [September 21, 2026, 2:55pm UTC](https://swi-prolog.discourse.group/t/how-to-generate-full-doc-files-of-a-project/9831 "2026-09-21T14:55:43Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![andrii](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@andrii](https://swi-prolog.discourse.group/u/andrii)
#### Post date: [September 21, 2026, 2:55pm UTC](https://swi-prolog.discourse.group/t/how-to-generate-full-doc-files-of-a-project/9831/1 "2026-09-21T14:55:43Z")

</div>

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,

```prolog
%! 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`,

```prolog
<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.

---

<div class="post-metadata">

### Author: ![andrii](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@andrii](https://swi-prolog.discourse.group/u/andrii)
#### Post date: [September 21, 2026, 6:36pm UTC](https://swi-prolog.discourse.group/t/how-to-generate-full-doc-files-of-a-project/9831/2 "2026-09-21T18:36:35Z")

</div>

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

```prolog
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

```prolog
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.
