Pages with handcrafted HTML tables throw JS errors
Some pages include handcrafted HTML tables.
Here's an example: https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/administration/reference_architectures/index.md?plain=1#L87
It renders OK on the Nanoc site: https://docs.gitlab.com/ee/administration/reference_architectures/
But it causes a JavaScript error on Hugo, making the navigation not render: https://new.docs.gitlab.com/ee/administration/reference_architectures/
Looks like we might need to adjust the scrolling headers plugin to only target regular markdown tables, and to ignore any handcrafted ones.
Some ideas to fix this:
- see if we can use a different selector in the JS code (e.g, use CSS
:hasto only target tables with the expected wrapper) - or, add a new template for markdown tables (https://gohugo.io/render-hooks/tables/) and use that to give them a special class we can use for targeting via the scrollable headers script
Edited by Sarah German
