-
-
Notifications
You must be signed in to change notification settings - Fork 416
Description
Overview of the issue
The configured custom logo (on the top left) is not shown for content under Additional documentation (including child pages), Classes, Interfaces and Miscellaneous, but shown as expected on root level pages.
Examples:
- Custom logo is shown initially
- Clicking on Getting started: custom logo is shown
- Clicking on README: custom logo is shown
- Clicking on Additional documentation: custom logo is shown (and child pages menu is shown)
- Clicking on Additional documentation => Any Child Page: logo disappears
A copy from Browser console for the compodoc-menu component shows that the relative link for the custom logo
<img alt="" class="img-responsive" data-type="custom-logo" src="images/my-logo.png">is not correct for the current depth:
<compodoc-menu mode="normal">
<nav>
<ul class="list">
<li class="title">
<a href="../index.html" data-type="index-link">
<img alt="" class="img-responsive" data-type="custom-logo" src="images/my-logo.png">
</a>
</li>
<li class="divider"></li>
<div id="book-search-input" role="search"><input type="text" placeholder="Type to search"></div>
...
</compodoc-menu>It should be:
<img alt="" class="img-responsive" data-type="custom-logo" src="../images/my-logo.png">When I change the link in the Browser console to ../images/my-logo.png the logo is shown.
Prerequisites:
- My custom logo
my-logo.pngis copied to./readme/images/ - My
compodoccommand as in mypackage.jsonscriptssection (compodoctarget:npm run compodoc):
compodoc -s -w -p tsconfig.json --theme laravel --disableTemplateTab --disableRoutesGraph --disableLifeCycleHooks --disableDomTree --disableStyleTab --hideGenerator --customLogo readme/my-logo.png --customFavicon readme/favicon.ico --includes readme --assetsFolder readme/images
NOTE: the favicon link is created correctly for child content pages:
<link rel="icon" type="image/x-icon" href="../images/favicon.ico">
Operating System, Node.js, npm, compodoc version(s)
- macOS BigSur or Monterey (12.0.1)
- Node.js v14, v16
- compodoc v1.1.15
Angular configuration, a package.json file in the root folder
- Not an Angular project, pure Node.js.
- The
package.jsonis in root folder as usual.
Compodoc installed globally or locally ?
Locally and is content generated by locally executed command.
If possible sourcecode of the file where it breaks
Unknown.
If possible your terminal logs before the error
Live reload enabled.
After clicking on a child page link:
Live reload enabled.
my-logo.png:1 GET http://127.0.0.1:8080/additional-documentation/images/my-logo.png 404 (Not Found)
Motivation for or Use Case
The custom logo is not shown for child content pages but should be shown for all pages (i.e. always).
Reproduce the error
- Configure your project for a custom logo (as shown above)
- Create any content under Additional documentation (maybe also child page structures) Classes, Interfaces or Miscellaneous in your
summary.json - Click on any content under these topics
Related issues
None, at least I couldn't find one in open issues.
Suggest a Fix
Find the code where the custom-logo links are generated and add a ../ in front of each additional depth.