{% macro render_header(path) %} {% set root = get_section(path="_index.md") %} {{ config.extra.juice_logo_name }} {% if config.extra.juice_extra_menu %} {% for menu in config.extra.juice_extra_menu %} {{ menu.title }} {% endfor %} {% endif %} {% for page in root.pages %} {% if lang == "en" %} {{ page.title }} {% else %} {{ page.title }} {% endif %} {% endfor %} {% for path in root.subsections %} {% set child = get_section(path=path) %} {% if lang == "en"%} {{ child.title }} {% else %} {{ child.title }} {% endif %} {% endfor %} {% set hyper="on click halt the event then set path to window.location.pathname js(path) let arr = path.split('/'); if (arr[1] == 'sv') { arr.shift(); arr.shift(); } else if (arr[0] == 'sv') { arr.shift(); } else{ arr[0] = 'sv'; } if (arr.slice(-1) == '' ) { arr.pop(); } arr.unshift(window.location.origin); return arr.join('/') end log(it) then set window.location to it"%} {% if lang == "en" %} {% else %} {% endif %} {% endmacro render_header %} {% macro render_toc(toc) %}