-
Notifications
You must be signed in to change notification settings - Fork 954
Description
Environment
- Version of Docsy you are using:
0.12.0 - How are you using Docsy? As a: Hugo module
- Version of Hugo you are using (output of
hugo version):0.148.2 - OS: macOS
Problem
I have encountered an HTML ID conflict when using the tabpane shortcode within a file that is included by the readfile shortcode.
The issue occurs because the readfile shortcode renders content that contains its own tabpane shortcode, but it generates the same HTML IDs as the tabpane shortcode used in the original content file. This creates duplicate IDs on the page, causing the tabs within the included content to become non-functional.
Example scenario:
- A main content file contains a
tabpaneshortcode. - Later in the same file, a
readfileshortcode is used to include a second file. - This included file also contains a
tabpaneshortcode.
The resulting HTML has two sets of tabs with identical HTML IDs, which prevents the second set of tabs from working correctly.
The expected behavior is for the shortcodes to generate unique IDs, perhaps by adding a random suffix or a contextual prefix, to prevent these conflicts. This would ensure that all tabs on the page function as intended, regardless of how they are nested or included.