bep / docuapi

Beautiful multilingual API documentation theme for Hugo
https://docuapi.netlify.app/
Other
750 stars 200 forks source link

Not working properly when rendering TOC in langauges other than English #34

Closed katopway closed 4 years ago

katopway commented 4 years ago

When language of the doc is switched to other languages like Chinese, or Norwegian like in the example site, the h2 items in TOC can not be expanded or collapsed automatically while scrolling the doc page, or being displayed when clicking on any h1 items with children.

Is there any way to make it work in other languages?

bep commented 4 years ago

I'll have a look.

rrbarrero commented 4 years ago

Same here: Error: Syntax error, unrecognized expression: #1-introducci%c3%b3n all.js:1750:8

bep commented 4 years ago

Yes, I debugged it down to some JS line, but my 10 minutes spent on this didn't find a fix ...

rrbarrero commented 4 years ago

If it can helps, in commit f2cb5423932c3542077daa77e24b4aa4effd6ff8 works for me.

bep commented 4 years ago

I have added a fix for this. Note that for this fix to work you need Hugo >= 0.61 and the Goldmark markdown renderer (default).