talos/website/themes/docsy/assets/js/markmap.js
Spencer Smith e3fda049fe
docs: overhaul all the docs
This moves our docs to a hugo-based doc setup with docsy theme.

Signed-off-by: Spencer Smith <spencer.smith@talos-systems.com>
2022-03-22 13:05:21 -04:00

20 lines
390 B
JavaScript

{{ with .Site.Params.markmap }}
{{ if .enable }}
(function($) {
var needMarkmap = false;
$('.language-markmap').parent().replaceWith(function() {
needMarkmap = true;
return $('<div class="markmap">').text($(this).text());
});
const { markmap } = window;
if(needMarkmap) {
markmap.autoLoader.renderAll();
}
})(jQuery);
{{ end }}
{{ end }}