jgazeau / shadocs

Shadocs Theme for Hugo
https://jgazeau.github.io/shadocs/
MIT License
51 stars 19 forks source link

[bug]: toc is not scrolling page if openapi is contained #173

Closed McShelby closed 1 year ago

McShelby commented 1 year ago

Steps that lead to the issue

Open https://shadocs.netlify.app/shortcodes/openapi/ Press some link inside "On this page"

Expected behavior

The pages should scroll to the fragment

Reproducer

See above

Solution?

Add

<script>window.noZensmooth = true;</script>

before loading the swagger-ui javascript files.

McShelby commented 1 year ago

As I shamelessly copied lots of your code for my own implementation of an openapi shortcode, I've stumbled across this bug also in your code.

So I thought at least, I could give back a bit. See McShelby/hugo-theme-relearn#526

jgazeau commented 1 year ago

Hi @McShelby , sorry for the delay and thanks a lot for the heads up. I'll correct this asap.