-
-
Notifications
You must be signed in to change notification settings - Fork 745
Description
Search terms
custom themes
Expected Behavior
- Custom theme output should be the same as the default when overridden
- JSX.Raw should write correctly the HTML in Hooks
- Google Analytics should write a valid Javascript
Actual Behavior
Today I was migrating from 0.21.x to 0.22.x, and my custom theme (2 additional scripts, nothing more) needs a migration too.
I started from a sample theme found on GitHub (this) but it didn't worked. I tried checking the documentation here but also this wasn't working as expected.
Here are the errors found:
- The sample theme had an invalid
docs
folder when tested. The outputdocs
folder was containing only two.html
files. The default theme that was overridden generates a lot of additional files,.css
and.js
files included. - I tried overriding the
analytics
property like in the documentation linked above, the issues were the same as the custom theme, but I noticed that also Google Analytics had issues since here and below all the'
characters will be replaced by the engine with the corresponding HTML escape value. - I tried the new hooks, Google Analytics had the same issue (so maybe it's in the engine) and when using
JSX.Raw
like described in the documentation linked above the parent<script>
tag was empty.
Steps to reproduce the bug
For testing the theme output you can just clone this repository
To see the invalid docs
output these are the steps:
cd typedoc-test-theme
yarn
ornpm i
yarn build
ornpm run build
cd demo
yarn
ornpm i
yarn build
ornpm run build
The demo/docs
folder will have only two html
files instead of the full output.
For testing the hooks output follow the steps described here in the hooks section.
Google Analytics seems broken in any test I've made, I've disabled it for now in my tsconfig.json
and used my custom theme to readd it manually.
Using the hooks I've found a workaround that can be seen here
You can also find more informations in the issue #1785, the required tags were the fix in that case.
Environment
- Typedoc version: 0.22.8
- TypeScript version: 4.4.4
- Node.js version: 16.13.0
- OS: macOS Big Sur 11.6.1