Fixes links to doc index in companion documentation

The template had a fixed relative link to the doc index as ../index.html
which breaks for included docs. A fixed link cannot be used because
the directory structure of included documentation is preserved.

We add a new string to the page dictionary which generates the correct
relative link (in the same way the CSS links are created). This is used
instead of the fixed link.

Fixes: #324