Closed davidsneighbour closed 3 years ago
I documented the shortcodes tabs
and tab
and tested it on the i18n-pages. Looks good and we don't need additional plugins and javascripts and stylesheets to implement that. It can be done via tabs with .toml/.yaml/.json in the tab titles and code fences inside the tabs.
Add the code switcher that the Hugo docs are using to show code for all three configuration languages (toml, yaml, json) and JS to keep the selection consistent across all pages.
https://github.com/gohugoio/gohugoioTheme/blob/3077c41231a29937304e9a9cf905c4bab968a7c9/layouts/shortcodes/code-toggle.html#L1
https://github.com/gohugoio/gohugoioTheme/blob/master/assets/js/codeblocks.js#L1
https://github.com/gohugoio/gohugoioTheme/blob/master/assets/js/tabs.js#L1