Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] custom-logo links are broken for doc deployments with a path #1203

Closed
deadratfink opened this issue Feb 1, 2022 · 1 comment
Closed

Comments

@deadratfink
Copy link

deadratfink commented Feb 1, 2022

The closed fix for #1147 (custom-logo links are broken for child content) does not allow a proper deployment of generated documentation under a path. I assume @compodoc/compodoc v1.1.18 (the one we use now) includes the fix.

When we deploy the generated docs we use a path, e.g. bar like in https://foo.com/bar/index.html to access our docs. If we do that the custom logo is not shown at all (not even on the root page of docs).

<img alt="" class="img-responsive" data-type="custom-logo" src={{strip-url "/images/" customLogo}}>

The fix done now expects images at root like https://foo.com/images/my-custom-logo.png instead of https://foo.com/bar/images/my-custom-logo.png. Pls could you add a dot in front of /images/ to make it relative (which then works also for path-based deployments):

<img alt="" class="img-responsive" data-type="custom-logo" src={{strip-url "./images/" customLogo}}>

Thx!

@deadratfink
Copy link
Author

deadratfink commented Feb 2, 2022

OK, my suggestion won't work for navigating to sub-pages (like in "Additional documentation"). For each hierarchy an adapted relative path is required. For instance, one level down we have to add ../images. That means it must be somehow calculated for each sub-page level...

For the surrounding link to the index.html this is somehow done already (copied from browser console):

<a href="../index.html" data-type="index-link">
    <img alt="" class="img-responsive" data-type="custom-logo" src="/images/my-custom-logo.png">
</a>

Could the generation of href="../index.html" also be applied to src="/images/my-custom-logo.png" to get the following result?

<a href="../index.html" data-type="index-link">
    <img alt="" class="img-responsive" data-type="custom-logo" src="../images/my-custom-logo.png">
</a>

@vogloblinsky vogloblinsky added this to the 1.1.19 milestone Feb 9, 2022
@vogloblinsky vogloblinsky changed the title custom-logo links are broken for doc deployments with a path [BUG] custom-logo links are broken for doc deployments with a path Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants