{% if not theme_logo.get("link") %} {% set href = pathto(root_doc) %} {% elif hasdoc(theme_logo.get("link")) %} {% set href = pathto(theme_logo.get("link")) %} {# internal page #} {% else %} {% set href = theme_logo.get("link") %} {# external url #} {% endif %} {% set alt = theme_logo.get("alt_text", "Logo image") %} {{ alt }} {% if theme_logo.get("text") %} {{ theme_logo.get("text") }} {%- endif %}