The plugin fails to append the generation timestamp to the footer when using the built-in 'minimal' theme. When using the default theme, the plugin works as expected.
The error occurs because the plugin uses the direct descendant selector to locate the generator container div.
if (!this.application.options.getValue('hideGenerator') && (!hideDate || !hideTime)) {
p = document.querySelector('body > div.container.tsd-generator > p');
...
However, when using the minimal theme, Typedoc adds some additional container elements between the body and the generator div.
DOM structure when using the default theme:body > div.container.tsd-generator > p
DOM structure when using the minimal theme:body > div.container.container-main > div.content-wrap > div.container.tsd-generator > p
Removing the child combinator between body and div.container.tsd-generator solves the problem.
Workaround:
As a workaround, if someone else also encounters this problem, simply disable the generation of the generator info by setting the flag --hideGenerator.
The plugin fails to append the generation timestamp to the footer when using the built-in 'minimal' theme. When using the default theme, the plugin works as expected.
Error:
Cannot read property 'innerHTML' of null
How to reproduce:
npx typedoc --plugin typedoc-plugin-extras --theme minimal
Analysis:
The error occurs because the plugin uses the direct descendant selector to locate the generator container
div
.However, when using the minimal theme, Typedoc adds some additional container elements between the
body
and the generatordiv
.DOM structure when using the default theme:
body > div.container.tsd-generator > p
DOM structure when using the minimal theme:
body > div.container.container-main > div.content-wrap > div.container.tsd-generator > p
Removing the child combinator between
body
anddiv.container.tsd-generator
solves the problem.Workaround:
As a workaround, if someone else also encounters this problem, simply disable the generation of the generator info by setting the flag
--hideGenerator
.Version:
typedoc: v0.17.7 typedoc-plugin-extras: v1.1.3