Commit f597beb
authored
.Page.Store.Add is broken in Hugo 0.158+ (returns nil).
Additionally, Hugo renders shortcodes bottom-up, so the parent
tabs.html cannot pass data to child tab.html via .Store.
Fix:
- shortcode-id partial: replace .Page.Store.Add with explicit
.Page.Store.Set + add, which works in Hugo 0.161+.
- tab.html: the first child tab generates a page-unique ID via
the partial and caches it on .Parent.Store for siblings.
- tabs.html: remove broken .Store.Set "id" line.
This avoids the .Parent.Ordinal collision when tabs are nested
inside other shortcodes (details, columns, etc.).
Fixes #817
1 parent 6d5d778 commit f597beb
2 files changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
2 | 5 | | |
3 | 6 | | |
4 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
0 commit comments