<div id="url-debug-message" class="row mt-3 d-none">
    <div class="col">
        <div class="alert alert-warning my-0" role="alert">
            <h5><i class="fas fa-exclamation-triangle"></i> Action required</h5>
            <strong>Problem:</strong>
            The current root path of this site is "<code class="root-path-text"></code>",
            which does not match the <code>baseurl</code> ("<code>{{ site.baseurl }}</code>") configured in <code>_config.yml</code>.
            <br>

            <strong>Solution:</strong>
            Please set the <code>baseurl</code> in <code>_config.yml</code> to "<code class="root-path-text"></code>".
        </div>
    </div>
</div>

<script>
striped_pathname = location.pathname.replace(/\/+$/, "");
if(striped_pathname != "{{ site.baseurl }}"){
    document.getElementById("url-debug-message").classList.remove('d-none');
}
document.querySelectorAll(".root-path-text").forEach(function(element){
    element.textContent = striped_pathname;
});
</script>
